0.0.13 • Published 11 years ago

file-mime v0.0.13

Weekly downloads
4
License
MIT
Repository
github
Last release
11 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

11 years ago

0.0.12

11 years ago

0.0.11

11 years ago

0.0.10

11 years ago

0.0.9

11 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago