1.0.0 • Published 7 years ago
content-type-to-ext v1.0.0
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
1.0.0
7 years ago