is-font

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i is-font

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • awcross