is-font
v1.1.0
Published
Detect if a file is a font
Downloads
3
Maintainers
Readme
is-font
Detect if a file is a font
Install
$ npm install --save is-font
Usage
const isFont = require('is-font');
isFont('awesomeFont.woff2');
//=> {ext: woff2, mime: application/font-woff}
isFont('fakeFont.ttf');
//=> false
API
isFont(filepath)
Returns an object if true. False otherwise.
filepath
Type: string
Path to the file.
Related
- is-font-cli - CLI for this module
License
MIT © Alex Cross