Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mime-names

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mime-names

Media Type Names Database

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 09 Oct 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc