kc-fctype

1.0.13 • Public • Published

FCType

[js] Return content type based on file name.

Mime list

This module needs a mime-type list to retrieve the data. You can obtain the list installing the kc-mime-list module.

Install

npm install kc-mime-list
npm install kc-fctype

Use

var mimes = require('kc-mime-list');
var fctype = require('kc-fctype');
var ctype  = fctype('my-file.js', mimes);
console.log(ctype); // 'application/javascript'

/kc-fctype/

    Package Sidebar

    Install

    npm i kc-fctype

    Weekly Downloads

    1

    Version

    1.0.13

    License

    ISC

    Unpacked Size

    2.04 kB

    Total Files

    5

    Last publish

    Collaborators

    • kaisarcode