diff options
Diffstat (limited to 'node_modules/mime-db/README.md')
-rw-r--r-- | node_modules/mime-db/README.md | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/node_modules/mime-db/README.md b/node_modules/mime-db/README.md index fed4eebac..d6a6f80aa 100644 --- a/node_modules/mime-db/README.md +++ b/node_modules/mime-db/README.md @@ -24,21 +24,23 @@ npm install mime-db ### Database Download If you're crazy enough to use this in the browser, you can just grab the -JSON file using [RawGit](https://rawgit.com/). It is recommended to replace -`master` with [a release tag](https://github.com/jshttp/mime-db/tags) as the -JSON format may change in the future. +JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to +replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags) +as the JSON format may change in the future. ``` -https://cdn.rawgit.com/jshttp/mime-db/master/db.json +https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json ``` ## Usage +<!-- eslint-disable no-unused-vars --> + ```js -var db = require('mime-db'); +var db = require('mime-db') // grab data on .js files -var data = db['application/javascript']; +var data = db['application/javascript'] ``` ## Data Structure @@ -76,19 +78,25 @@ and the values being an object with the following keys: To update the build, run `npm run build`. -## Adding Custom Media Types +### Adding Custom Media Types The best way to get new media types included in this library is to register them with the IANA. The community registration procedure is outlined in [RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types registered with the IANA are automatically pulled into this library. -[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg -[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg +If that is not possible / feasible, they can be added directly here as a +"custom" type. To do this, it is required to have a primary source that +definitively lists the media type. If an extension is going to be listed as +associateed with this media type, the source must definitively link the +media type and extension as well. + +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master +[node-image]: https://badgen.net/npm/node/mime-db +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-db [npm-url]: https://npmjs.org/package/mime-db -[travis-image]: https://img.shields.io/travis/jshttp/mime-db/master.svg +[npm-version-image]: https://badgen.net/npm/v/mime-db +[travis-image]: https://badgen.net/travis/jshttp/mime-db/master [travis-url]: https://travis-ci.org/jshttp/mime-db -[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master -[node-image]: https://img.shields.io/node/v/mime-db.svg -[node-url]: https://nodejs.org/en/download/ |