mime-type-check
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

mime-type-check build license

Check all the available MIME types of a extension.


It uses Mime-db as its core database.
Do not use this module to actually check the MIME type of a local or remote file. For that use File-type

Install

npm install mime-type-check

Usage

const getMimeType = require('mime-type-check');
 
getMimeType('svg'); //=> ['image/svg+xml']
getMimeType('png'); //=> ['image/png']
getMimeType('3gpp') //=> ['audio/3gpp', 'video/3gpp']

API

getMimeType(string)

string is the extension to check the mimetypes for.

Support

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    250
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    250
  • 1.0.2
    1
  • 1.0.1
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i mime-type-check

Weekly Downloads

253

Version

2.0.0

License

MIT

Unpacked Size

3.82 kB

Total Files

5

Last publish

Collaborators

  • rocktimsaikia