package.json 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {
  2. "name": "mime-types",
  3. "description": "The ultimate javascript content-type utility.",
  4. "version": "2.0.9",
  5. "contributors": [
  6. {
  7. "name": "Douglas Christopher Wilson",
  8. "email": "doug@somethingdoug.com"
  9. },
  10. {
  11. "name": "Jeremiah Senkpiel",
  12. "email": "fishrock123@rocketmail.com",
  13. "url": "https://searchbeam.jit.su"
  14. },
  15. {
  16. "name": "Jonathan Ong",
  17. "email": "me@jongleberry.com",
  18. "url": "http://jongleberry.com"
  19. }
  20. ],
  21. "license": "MIT",
  22. "keywords": [
  23. "mime",
  24. "types"
  25. ],
  26. "repository": {
  27. "type": "git",
  28. "url": "git://github.com/jshttp/mime-types"
  29. },
  30. "dependencies": {
  31. "mime-db": "~1.7.0"
  32. },
  33. "devDependencies": {
  34. "istanbul": "0.3.5",
  35. "mocha": "~1.21.5"
  36. },
  37. "files": [
  38. "HISTORY.md",
  39. "LICENSE",
  40. "index.js"
  41. ],
  42. "engines": {
  43. "node": ">= 0.6"
  44. },
  45. "scripts": {
  46. "test": "mocha --reporter spec test/test.js",
  47. "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
  48. "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
  49. },
  50. "readme": "# mime-types\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-version-image]][node-version-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n\nThe ultimate javascript content-type utility.\n\nSimilar to [node-mime](https://github.com/broofa/node-mime), except:\n\n- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`,\n so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.\n- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.\n- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db)\n- No `.define()` functionality\n\nOtherwise, the API is compatible.\n\n## Install\n\n```sh\n$ npm install mime-types\n```\n\n## Adding Types\n\nAll mime types are based on [mime-db](https://github.com/jshttp/mime-db),\nso open a PR there if you'd like to add mime types.\n\n## API\n\n```js\nvar mime = require('mime-types')\n```\n\nAll functions return `false` if input is invalid or not found.\n\n### mime.lookup(path)\n\nLookup the content-type associated with a file.\n\n```js\nmime.lookup('json') // 'application/json'\nmime.lookup('.md') // 'text/x-markdown'\nmime.lookup('file.html') // 'text/html'\nmime.lookup('folder/file.js') // 'application/javascript'\n\nmime.lookup('cats') // false\n```\n\n### mime.contentType(type)\n\nCreate a full content-type header given a content-type or extension.\n\n```js\nmime.contentType('markdown') // 'text/x-markdown; charset=utf-8'\nmime.contentType('file.json') // 'application/json; charset=utf-8'\n```\n\n### mime.extension(type)\n\nGet the default extension for a content-type.\n\n```js\nmime.extension('application/octet-stream') // 'bin'\n```\n\n### mime.charset(type)\n\nLookup the implied default charset of a content-type.\n\n```js\nmime.charset('text/x-markdown') // 'UTF-8'\n```\n\n### var type = mime.types[extension]\n\nA map of content-types by extension.\n\n### [extensions...] = mime.extensions[type]\n\nA map of extensions by content-type.\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/mime-types.svg?style=flat\n[npm-url]: https://npmjs.org/package/mime-types\n[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat\n[node-version-url]: http://nodejs.org/download/\n[travis-image]: https://img.shields.io/travis/jshttp/mime-types.svg?style=flat\n[travis-url]: https://travis-ci.org/jshttp/mime-types\n[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/jshttp/mime-types\n[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg?style=flat\n[downloads-url]: https://npmjs.org/package/mime-types\n",
  51. "readmeFilename": "README.md",
  52. "bugs": {
  53. "url": "https://github.com/jshttp/mime-types/issues"
  54. },
  55. "homepage": "https://github.com/jshttp/mime-types",
  56. "_id": "mime-types@2.0.9",
  57. "_shasum": "e8449aff27b1245ddc6641b524439ae80c4b78a6",
  58. "_from": "mime-types@~2.0.9",
  59. "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.9.tgz"
  60. }