Detect if a file is a font
$ npm install --save is-font
const isFont = require('is-font');
isFont('awesome.woff2');
//=> {ext: woff2, mime: application/font-woff}
isFont('fake.ttf');
//=> false
Returns an object if true. False otherwise.
Type: string
Path to the file.
- is-font-cli - CLI for this module
MIT © Alex Cross