JSPM

set-type

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q13471F
  • License MIT

set well-formatted content-type headers

Package Exports

  • set-type

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (set-type) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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
})