content-type-to-ext
v1.0.0
Published
Map content-type to file extension (and vice-versa)
Downloads
850
Maintainers
Readme
content-type-to-ext
Map Content-Type to file extension (and vice-versa)
Installation
# Using Yarn:
yarn add content-type-to-ext
# Or, using NPM:
npm install content-type-to-ext --save
Usage
import { getContentType, getExtension } from 'content-type-to-ext'
getContentType('jpg') // image/jpeg
getExtension('image/jpeg') // jpg
Tests
npm test
License
MIT