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 = ;ezmime // "text/html"ezmime // "audio/mpeg"ezmime // "text/css"ezmime // "application/javascript"