content-type-to-language-name
v1.2.0
Published
Maps a list of content types to a list of language names
Downloads
2,005
Readme
content-type-to-language-name
Manually curated map of valid mime content-types to a list of valid highlight.js language names.
Install
npm install content-type-to-language-name
Usage
You can retrieve the language name by using the default method:
const getLanguage = require('content-type-to-language-name')
getLanguage('application/javascript') // javascript
also the raw map is available:
const contentTypeToLanguageName = require('content-type-to-language-name').map