digitalbazaar/mime-db

Name: mime-db

Owner: Digital Bazaar, Inc.

Description: Media Type Database

Created: 2015-02-23 15:56:50.0

Updated: 2015-02-23 15:56:51.0

Pushed: 2015-02-23 16:07:21.0

Homepage: null

Size: 581

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

mime-db

NPM Version NPM Downloads Node.js Version Build Status Coverage Status

This is a database of all mime types. It consists of a single, public JSON file and does not include any logic, allowing it to remain as un-opinionated as possible with an API. It aggregates data from the following sources:

Installation
install mime-db

If you're crazy enough to use this in the browser, you can just grab the JSON file:

s://cdn.rawgit.com/jshttp/mime-db/master/db.json
Usage
db = require('mime-db');

rab data on .js files
data = db['application/javascript'];
Data Structure

The JSON file is a map lookup for lowercased mime types. Each mime type has the following properties:

If unknown, every property could be undefined.

Contributing

To edit the database, only make PRs against src/custom.json or src/custom-suffix.json.

To update the build, run npm run update.

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. Types registered with the IANA are automatically pulled into this library.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.