mime-names

1.0.0 • Public • Published

mime-names

This is a database of mime names keyed by mime types. It was created to use alongside https://github.com/jshttp/mime-db and as such mirrors the structure of the project.

It does not try to be all encompassing and instead includes the most popular file formats, your code should gracefully handle a mime type not existing in this database.

Installation

npm install mime-names

Usage

var db = require('mime-names');
 
var data = db['application/javascript'];
console.log(data.name);

Contributing

Happily accepting PR's which add new types and names, particularly those listed in mime-db

Data Structure

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

  • .name - a human readable description of the file type
  • .extensions[] - known extensions associated with this mime type.

Package Sidebar

Install

npm i mime-names

Weekly Downloads

318

Version

1.0.0

License

MIT

Last publish

Collaborators

  • tommoor