-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
60 lines (60 loc) · 4.12 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
"name": "mime-db",
"description": "Media Type Database",
"version": "1.1.0",
"author": {
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/jshttp/mime-db"
},
"devDependencies": {
"co": "3",
"cogent": "1",
"csv-parse": "0",
"gnode": "0.1.0",
"istanbul": "0.3.2",
"mocha": "~1.21.4",
"stream-to-array": "2"
},
"engines": {
"node": ">= 0.6"
},
"files": [
"LICENSE",
"db.json",
"index.js"
],
"scripts": {
"update": "gnode scripts/extensions && gnode scripts/types && node scripts/build",
"clean": "rm src/*",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
},
"keywords": [
"mime",
"db",
"type",
"types",
"database",
"charset",
"charsets"
],
"readme": "# mime-db\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][travis-image]][travis-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n\nThis is a database of all mime types.\nIt consistents of a single, public JSON file and does not include any logic,\nallowing it to remain as unopinionated as possible with an API.\nIt aggregates data from the following sources:\n\n- http://www.iana.org/assignments/media-types/media-types.xhtml\n- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types\n\n## Usage\n\n```bash\nnpm i mime-db\n```\n\n```js\nvar db = require('mime-db');\n\n// grab data on .js files\nvar data = db['application/javascript'];\n```\n\nIf you're crazy enough to use this in the browser,\nyou can just grab the JSON file:\n\n```\nhttps://cdn.rawgit.com/jshttp/mime-db/master/db.json\n```\n\n## Data Structure\n\nThe JSON file is a map lookup for lowercased mime types.\nEach mime type has the following properties:\n\n- `.source` - where the mime type is defined.\n If not set, it's probably a custom media type.\n - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)\n - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)\n- `.extensions[]` - known extensions associated with this mime type.\n- `.compressible` - whether a file of this type is can be gzipped.\n- `.charset` - the default charset associated with this type, if any.\n\nIf unknown, every property could be `undefined`.\n\n## Repository Structure\n\n- `scripts` - these are scripts to run to build the database\n- `src/` - this is a folder of files created from remote sources like Apache and IANA\n- `lib/` - this is a folder of our own custom sources and db, which will be merged into `db.json`\n- `db.json` - the final built JSON file for end-user usage\n\n## Contributing\n\nTo edit the database, only make PRs against files in the `lib/` folder.\nTo update the build, run `npm run update`.\n\n[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg?style=flat\n[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg?style=flat\n[npm-url]: https://npmjs.org/package/mime-db\n[travis-image]: https://img.shields.io/travis/jshttp/mime-db.svg?style=flat\n[travis-url]: https://travis-ci.org/jshttp/mime-db\n[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master\n[node-image]: https://img.shields.io/node/v/mime-db.svg?style=flat\n[node-url]: http://nodejs.org/download/\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/jshttp/mime-db/issues"
},
"homepage": "https://github.com/jshttp/mime-db",
"_id": "mime-db@1.1.0",
"dist": {
"shasum": "8c83205c231aa3976c06864e89822d711f9f95fb"
},
"_from": "mime-db@~1.1.0",
"_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.1.0.tgz"
}