ezmime

1.2.0 • Public • Published

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"

Readme

Keywords

Package Sidebar

Install

npm i ezmime

Weekly Downloads

10

Version

1.2.0

License

ISC

Last publish

Collaborators

  • forgetable