ezmime
v1.2.0
Published
Clean and fast filename-to-mime converter
Downloads
4
Readme
ezmime
Very clean and fast filename-to-MIME library
Install
Install with npm:
npm install ezmime
Usage
Ezmime will convert strings such as ".html", "html" or "index.html" to the MIME type returning "text/html" for all there requests. You can see ezmime usage below:
const ezmime = require('ezmime');
ezmime.see('/var/www/html/index.html') // "text/html"
ezmime.see('kick.mp3') // "audio/mpeg"
ezmime.see('.css') // "text/css"
ezmime.see('js') // "application/javascript"