1.1.0 • Published 7 years ago

is-font v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

is-font Build Status Coverage Status

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

License

MIT © Alex Cross