content-types-by-file-extension
v1.0.1
Published
Yields the corresponding MIME content types for file extensions.
Downloads
68
Readme
content-types-by-file-extension
Yields the corresponding MIME content types for file extensions. Goal is a simple and independent implementation for a simple task.
Usage
//import the module
const contentTypesByFileExtension = require('content-types-by-file-extension')
//This yields the ContentType for ".html" files: "text/html"
const htmlContentType = contentTypesByFileExtension['html']
Installation
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js.
Installation is done using the
npm install
command:
$ npm i content-types-by-file-extension