Socket
Socket
Sign inDemoInstall

mime-names

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mime-names

Media Type Names Database


Version published
Weekly downloads
148
decreased by-8.07%
Maintainers
1
Install size
75.8 kB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 09 Oct 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc