{"versions":{"1.0.4":{"name":"content-type","description":"Create and parse HTTP Content-Type header","version":"1.0.4","author":{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},"license":"MIT","keywords":["content-type","http","req","res","rfc7231"],"repository":{"type":"git","url":"git+https://github.com/jshttp/content-type.git"},"devDependencies":{"eslint":"3.19.0","eslint-config-standard":"10.2.1","eslint-plugin-import":"2.7.0","eslint-plugin-node":"5.1.1","eslint-plugin-promise":"3.5.0","eslint-plugin-standard":"3.0.1","istanbul":"0.4.5","mocha":"~1.21.5"},"files":["LICENSE","HISTORY.md","README.md","index.js"],"engines":{"node":">= 0.6"},"scripts":{"lint":"eslint .","test":"mocha --reporter spec --check-leaks --bail test/","test-ci":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"},"gitHead":"d22f8ac6c407789c906bd6fed137efde8f772b09","bugs":{"url":"https://github.com/jshttp/content-type/issues"},"homepage":"https://github.com/jshttp/content-type#readme","_id":"content-type@1.0.4","_npmVersion":"5.3.0","_nodeVersion":"6.11.3","_npmUser":{"name":"anonymous","email":"doug@somethingdoug.com"},"dist":{"shasum":"e138cc75e040c727b1966fe5e5f8c9aee256fe3b","size":4655,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/content-type/-/content-type-1.0.4.tgz"},"maintainers":[{"name":"anonymous","email":"doug@somethingdoug.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/content-type-1.0.4.tgz_1505166155546_0.06956395204178989"},"directories":{},"publish_time":1505166156476,"_hasShrinkwrap":false,"_cnpm_publish_time":1505166156476,"contributors":[]},"1.0.3":{"name":"content-type","description":"Create and parse HTTP Content-Type header","version":"1.0.3","author":{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},"license":"MIT","keywords":["content-type","http","req","res","rfc7231"],"repository":{"type":"git","url":"git+https://github.com/jshttp/content-type.git"},"devDependencies":{"eslint":"3.19.0","eslint-config-standard":"10.2.1","eslint-plugin-import":"2.7.0","eslint-plugin-node":"5.1.1","eslint-plugin-promise":"3.5.0","eslint-plugin-standard":"3.0.1","istanbul":"0.4.5","mocha":"~1.21.5"},"files":["LICENSE","HISTORY.md","README.md","index.js"],"engines":{"node":">= 0.6"},"scripts":{"lint":"eslint .","test":"mocha --reporter spec --check-leaks --bail test/","test-ci":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"},"gitHead":"255c440e81ffe0f3eaa4b4644360d2f352aeff48","bugs":{"url":"https://github.com/jshttp/content-type/issues"},"homepage":"https://github.com/jshttp/content-type#readme","_id":"content-type@1.0.3","_shasum":"da18ef2fb64ca6acc905cc72017d3f38185b91d1","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"anonymous","email":"doug@somethingdoug.com"},"dist":{"shasum":"da18ef2fb64ca6acc905cc72017d3f38185b91d1","size":3811,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/content-type/-/content-type-1.0.3.tgz"},"maintainers":[{"name":"anonymous","email":"doug@somethingdoug.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/content-type-1.0.3.tgz_1505105047769_0.7591841116081923"},"directories":{},"publish_time":1505105048721,"_cnpm_publish_time":1505105048721,"_hasShrinkwrap":false,"contributors":[]},"1.0.2":{"name":"content-type","description":"Create and parse HTTP Content-Type header","version":"1.0.2","author":{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},"license":"MIT","keywords":["content-type","http","req","res","rfc7231"],"repository":{"type":"git","url":"git+https://github.com/jshttp/content-type.git"},"devDependencies":{"istanbul":"0.4.3","mocha":"~1.21.5"},"files":["LICENSE","HISTORY.md","README.md","index.js"],"engines":{"node":">= 0.6"},"scripts":{"test":"mocha --reporter spec --check-leaks --bail test/","test-ci":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"},"gitHead":"8118763adfbbac80cf1254191889330aec8b8be7","bugs":{"url":"https://github.com/jshttp/content-type/issues"},"homepage":"https://github.com/jshttp/content-type#readme","_id":"content-type@1.0.2","_shasum":"b7d113aee7a8dd27bd21133c4dc2529df1721eed","_from":".","_npmVersion":"2.15.1","_nodeVersion":"4.4.3","_npmUser":{"name":"anonymous","email":"doug@somethingdoug.com"},"dist":{"shasum":"b7d113aee7a8dd27bd21133c4dc2529df1721eed","size":3662,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/content-type/-/content-type-1.0.2.tgz"},"maintainers":[{"name":"anonymous","email":"doug@somethingdoug.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/content-type-1.0.2.tgz_1462852785748_0.5491233412176371"},"directories":{},"publish_time":1462852788395,"_cnpm_publish_time":1462852788395,"_hasShrinkwrap":false,"contributors":[]},"1.0.1":{"name":"content-type","description":"Create and parse HTTP Content-Type header","version":"1.0.1","author":{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},"license":"MIT","keywords":["content-type","http","req","res","rfc7231"],"repository":{"type":"git","url":"https://github.com/jshttp/content-type"},"devDependencies":{"istanbul":"0.3.5","mocha":"~1.21.5"},"files":["LICENSE","HISTORY.md","README.md","index.js"],"engines":{"node":">= 0.6"},"scripts":{"test":"mocha --reporter spec --check-leaks --bail test/","test-ci":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"},"gitHead":"3aa58f9c5a358a3634b8601602177888b4a477d8","bugs":{"url":"https://github.com/jshttp/content-type/issues"},"homepage":"https://github.com/jshttp/content-type","_id":"content-type@1.0.1","_shasum":"a19d2247327dc038050ce622b7a154ec59c5e600","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"anonymous","email":"doug@somethingdoug.com"},"maintainers":[{"name":"anonymous","email":"doug@somethingdoug.com"}],"dist":{"shasum":"a19d2247327dc038050ce622b7a154ec59c5e600","size":3635,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/content-type/-/content-type-1.0.1.tgz"},"directories":{},"publish_time":1423874277925,"_cnpm_publish_time":1423874277925,"_hasShrinkwrap":false,"contributors":[]},"1.0.0":{"name":"content-type","description":"Create and parse HTTP Content-Type header","version":"1.0.0","author":{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},"license":"MIT","keywords":["content-type","http","req","res","rfc7231"],"repository":{"type":"git","url":"https://github.com/jshttp/content-type"},"devDependencies":{"istanbul":"0.3.5","mocha":"~1.21.5"},"files":["LICENSE","HISTORY.md","README.md","index.js"],"engines":{"node":">= 0.6"},"scripts":{"test":"mocha --reporter spec --check-leaks --bail test/","test-ci":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"},"gitHead":"31266966b656ace33556e8dfd432b0790df82870","bugs":{"url":"https://github.com/jshttp/content-type/issues"},"homepage":"https://github.com/jshttp/content-type","_id":"content-type@1.0.0","_shasum":"2b66ca456422371bd04e63fdda92501210f40be4","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"anonymous","email":"doug@somethingdoug.com"},"maintainers":[{"name":"anonymous","email":"doug@somethingdoug.com"}],"dist":{"shasum":"2b66ca456422371bd04e63fdda92501210f40be4","size":3528,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/content-type/-/content-type-1.0.0.tgz"},"directories":{},"publish_time":1422862289037,"_cnpm_publish_time":1422862289037,"_hasShrinkwrap":false,"contributors":[]},"0.0.1":{"name":"content-type","version":"0.0.1","description":"Javascript/ECMAScript library for parsing Content-Type and Media/MIME type strings","main":"content-type.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/deoxxa/content-type.git"},"keywords":["content-type","parse","http","header"],"author":{"name":"Austin Wright","email":"https://github.com/Acubed"},"license":"Unlicense <http://unlicense.org/>","bugs":{"url":"https://github.com/deoxxa/content-type/issues"},"readmeFilename":"README.md","_id":"content-type@0.0.1","dist":{"shasum":"b8dd2786f814b2c8d0985fdbea8a3d361366ea80","size":3974,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/content-type/-/content-type-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"anonymous","email":"deoxxa@fknsrs.biz"},"maintainers":[{"name":"anonymous","email":"doug@somethingdoug.com"}],"directories":{},"publish_time":1381217874398,"_cnpm_publish_time":1381217874398,"_hasShrinkwrap":false,"contributors":[]},"1.0.5":{"name":"content-type","description":"Create and parse HTTP Content-Type header","version":"1.0.5","author":{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},"license":"MIT","keywords":["content-type","http","req","res","rfc7231"],"repository":{"type":"git","url":"git+https://github.com/jshttp/content-type.git"},"devDependencies":{"deep-equal":"1.0.1","eslint":"8.32.0","eslint-config-standard":"15.0.1","eslint-plugin-import":"2.27.5","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"6.1.1","eslint-plugin-standard":"4.1.0","mocha":"10.2.0","nyc":"15.1.0"},"engines":{"node":">= 0.6"},"scripts":{"lint":"eslint .","test":"mocha --reporter spec --check-leaks --bail test/","test-ci":"nyc --reporter=lcovonly --reporter=text npm test","test-cov":"nyc --reporter=html --reporter=text npm test","version":"node scripts/version-history.js && git add HISTORY.md"},"gitHead":"6115a4064e4dfd9845241c3f89c233ee2423deeb","bugs":{"url":"https://github.com/jshttp/content-type/issues"},"homepage":"https://github.com/jshttp/content-type#readme","_id":"content-type@1.0.5","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==","shasum":"8b773162656d1d1086784c8f23a54ce6d73d7918","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/content-type/-/content-type-1.0.5.tgz","fileCount":5,"unpackedSize":10471,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAOjshRzvCHEtoGbwMNDa5gcXrVmrEvYFj1lNvszSRDrAiEAz70aazwtwXKqbbN4J19JbeGcEbVkfO3B3/Mmv6OEhfE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1shHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVkQ//W5y8wqmK9RwQlZ+c+Vx9as9LDZ/8f/hKHDOS7/PSl9vTOqdc\r\nWaS0WohfVHqmLvmF2nqFukL8dCtls1MtIopqPz90Z3DoUcTkm+LN0lcjcGd2\r\nOh45l7odtaXzFW5K0kzPlNAbgPPaWL4k6YT0ybdtMvVRHjoLB1V/I0JtUmP7\r\n2I4g5yezk+sS+JSmkgfMW3BiJZmWzLrl5YBtvQVtv1Nfw4S7wGmnfSoVtktq\r\nwbTHnhwsnJQcHfcGrGIZmtDmgySiBoWwURBbDlIthQmSxpscjlvpGSWLygK5\r\n3nEa/e+Pbv23x9gC0DmrnT2WdkI66jLS+56ixhqQGzeW7D6dahFklJQSmN8C\r\n2Aj+8LtNZLjo0DdZ6NW5stezwo/ELBanOmR3cLJHQ/+kwBomrPVYKX72yzd1\r\n4clMw6zFUKFnaZS+8r0R3GYUvoeylueoaBBLRiBB5c8pJNXF3mLZ1Zig47dh\r\npUuvAJ+TCfcFBOFSI/vKsTQ0E8TMSOQYOuM6SLAeWsxjJBLdedLHmKK9Y8VC\r\nWRmOWIrE8j1sc6E4odGPdy/tgpU+gLp5xG2IUF58XIbQih3OoYpN77bRdTYX\r\nUVha8Xf60h6ntj0NuS9zrK3LWWyfCzSPd8bX/caFUUeZjZwNwP2d/SCo8tia\r\nZ9SPx+wvGeJ2bqwqVg5r13fC/iI0+PmAagI=\r\n=Upqr\r\n-----END PGP SIGNATURE-----\r\n","size":3914},"_npmUser":{"name":"anonymous","email":"doug@somethingdoug.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"doug@somethingdoug.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/content-type_1.0.5_1675020359482_0.5719775224587853"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-29T19:25:59.622Z","publish_time":1675020359622,"contributors":[]}},"dist-tags":{"latest":"1.0.5"},"name":"content-type","time":{"modified":"2025-05-14T14:57:04.636Z","created":"2022-01-26T12:58:06.569Z","1.0.4":"2017-09-11T21:42:36.476Z","1.0.3":"2017-09-11T04:44:08.721Z","1.0.2":"2016-05-10T03:59:48.395Z","1.0.1":"2015-02-14T00:37:57.925Z","1.0.0":"2015-02-02T07:31:29.037Z","0.0.1":"2013-10-08T07:37:54.398Z","1.0.5":"2023-01-29T19:25:59.622Z"},"readme":"# content-type\n\n[![NPM Version][npm-version-image]][npm-url]\n[![NPM Downloads][npm-downloads-image]][npm-url]\n[![Node.js Version][node-image]][node-url]\n[![Build Status][ci-image]][ci-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n\nCreate and parse HTTP Content-Type header according to RFC 7231\n\n## Installation\n\n```sh\n$ npm install content-type\n```\n\n## API\n\n```js\nvar contentType = require('content-type')\n```\n\n### contentType.parse(string)\n\n```js\nvar obj = contentType.parse('image/svg+xml; charset=utf-8')\n```\n\nParse a `Content-Type` header. This will return an object with the following\nproperties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):\n\n - `type`: The media type (the type and subtype, always lower case).\n   Example: `'image/svg+xml'`\n\n - `parameters`: An object of the parameters in the media type (name of parameter\n   always lower case). Example: `{charset: 'utf-8'}`\n\nThrows a `TypeError` if the string is missing or invalid.\n\n### contentType.parse(req)\n\n```js\nvar obj = contentType.parse(req)\n```\n\nParse the `Content-Type` header from the given `req`. Short-cut for\n`contentType.parse(req.headers['content-type'])`.\n\nThrows a `TypeError` if the `Content-Type` header is missing or invalid.\n\n### contentType.parse(res)\n\n```js\nvar obj = contentType.parse(res)\n```\n\nParse the `Content-Type` header set on the given `res`. Short-cut for\n`contentType.parse(res.getHeader('content-type'))`.\n\nThrows a `TypeError` if the `Content-Type` header is missing or invalid.\n\n### contentType.format(obj)\n\n```js\nvar str = contentType.format({\n  type: 'image/svg+xml',\n  parameters: { charset: 'utf-8' }\n})\n```\n\nFormat an object into a `Content-Type` header. This will return a string of the\ncontent type for the given object with the following properties (examples are\nshown that produce the string `'image/svg+xml; charset=utf-8'`):\n\n - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'`\n\n - `parameters`: An object of the parameters in the media type (name of the\n   parameter will be lower-cased). Example: `{charset: 'utf-8'}`\n\nThrows a `TypeError` if the object contains an invalid type or parameter names.\n\n## License\n\n[MIT](LICENSE)\n\n[ci-image]: https://badgen.net/github/checks/jshttp/content-type/master?label=ci\n[ci-url]: https://github.com/jshttp/content-type/actions/workflows/ci.yml\n[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/content-type/master\n[coveralls-url]: https://coveralls.io/r/jshttp/content-type?branch=master\n[node-image]: https://badgen.net/npm/node/content-type\n[node-url]: https://nodejs.org/en/download\n[npm-downloads-image]: https://badgen.net/npm/dm/content-type\n[npm-url]: https://npmjs.org/package/content-type\n[npm-version-image]: https://badgen.net/npm/v/content-type","users":{}}