Socket
Book a DemoInstallSign in
Socket

content-type-to-ext

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

content-type-to-ext

Map content-type to file extension (and vice-versa)

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

content-type-to-ext Build Status npm mit

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

Keywords

content

FAQs

Package last updated on 08 Sep 2017

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