Fix license issues
[sdnc/oam.git] / dgbuilder / dgeflows / node_modules / express / node_modules / type-is / node_modules / mime-types / node_modules / mime-db / README.md
1 # mime-db
2
3 [![NPM Version][npm-version-image]][npm-url]
4 [![NPM Downloads][npm-downloads-image]][npm-url]
5 [![Node.js Version][node-image]][node-url]
6 [![Build Status][travis-image]][travis-url]
7 [![Coverage Status][coveralls-image]][coveralls-url]
8
9 This is a database of all mime types.
10 It consists of a single, public JSON file and does not include any logic,
11 allowing it to remain as un-opinionated as possible with an API.
12 It aggregates data from the following sources:
13
14 - http://www.iana.org/assignments/media-types/media-types.xhtml
15 - http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
16
17 ## Installation
18
19 ```bash
20 npm install mime-db
21 ```
22
23 If you're crazy enough to use this in the browser,
24 you can just grab the JSON file:
25
26 ```
27 https://cdn.rawgit.com/jshttp/mime-db/master/db.json
28 ```
29
30 ## Usage
31
32 ```js
33 var db = require('mime-db');
34
35 // grab data on .js files
36 var data = db['application/javascript'];
37 ```
38
39 ## Data Structure
40
41 The JSON file is a map lookup for lowercased mime types.
42 Each mime type has the following properties:
43
44 - `.source` - where the mime type is defined.
45     If not set, it's probably a custom media type.
46     - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
47     - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
48 - `.extensions[]` - known extensions associated with this mime type.
49 - `.compressible` - whether a file of this type is can be gzipped.
50 - `.charset` - the default charset associated with this type, if any.
51
52 If unknown, every property could be `undefined`.
53
54 ## Contributing
55
56 To edit the database, only make PRs against `src/custom.json` or
57 `src/custom-suffix.json`.
58
59 To update the build, run `npm run update`.
60
61 ## Adding Custom Media Types
62
63 The best way to get new media types included in this library is to register
64 them with the IANA. The community registration procedure is outlined in
65 [RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
66 registered with the IANA are automatically pulled into this library.
67
68 [npm-version-image]: https://img.shields.io/npm/v/mime-db.svg?style=flat
69 [npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg?style=flat
70 [npm-url]: https://npmjs.org/package/mime-db
71 [travis-image]: https://img.shields.io/travis/jshttp/mime-db.svg?style=flat
72 [travis-url]: https://travis-ci.org/jshttp/mime-db
73 [coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db.svg?style=flat
74 [coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
75 [node-image]: https://img.shields.io/node/v/mime-db.svg?style=flat
76 [node-url]: http://nodejs.org/download/