file-mime
Basic MIME type mapping module.
Installation
$ npm install file-mime
Running Tests
Install dev dependencies.
$ npm install
Run tests.
$ npm test
Check code quality.
$ npm run lint
Example
'use strict'; var mime = require('file-mime'); mime.type('json'); // => "application/json"mime.find('json'); // => "application/json"mime.lookup('json'); // => "application/json" mime.extension('application/json'); // => "json" mime.find('foo1'); // => falsemime.define('foo1', 'bar1'); // synonym for mime.defineOnemime.find('foo1'); // => "bar1" mime.find('foo2'); // => falsemime.find('foo3'); // => falsemime.define({ // synonym for mime.defineMore 'foo2': 'bar2', 'foo3': 'bar3'});mime.find('foo2'); // => "bar2"mime.find('foo3'); // => "bar3"
License
MIT