npm.io
2.0.1 • Published 1 year ago

mime2ext

Licence
MIT
Version
2.0.1
Deps
1
Size
3 kB
Vulns
0
Weekly
0
Stars
8

Mime2Ext

Convert a mime type to a file extension. It works only with popular mime types and it's super lightweight.

This library is designed to only support the ~300 popular mime types listed here.

Install

npm install mime2ext

Usage

import mime2ext from 'mime2ext';

// Let's convert a mime type to a file extension

mime2ext ( 'audio/mp3' ); // => 'mp3'

License

MIT Fabio Spampinato

Keywords