Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

set-type

1.0.1 • Public • Published

DEPRECATED - Please use mime-types instead.

Set Type

Return a well-formatted content type header given an extension.

var set = require('set-type')
 
app.use(function (req, res) {
  res.setHeader('Content-Type', set('html'))
  // => text/html; charset=utf-8
})

Keywords

none

install

npm i set-type

Downloadsweekly downloads

52

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability