0.0.13 • Published 10 years ago

file-mime v0.0.13

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

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');                  // => false
mime.define('foo1', 'bar1');        // synonym for mime.defineOne
mime.find('foo1');                  // => "bar1"

mime.find('foo2');                  // => false
mime.find('foo3');                  // => false
mime.define({                       // synonym for mime.defineMore
  'foo2': 'bar2',
  'foo3': 'bar3'
});
mime.find('foo2');                  // => "bar2"
mime.find('foo3');                  // => "bar3"

License

MIT

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago