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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    2
  • 1.0.0
    2
  • 0.1.0
    1

Package Sidebar

Install

npm i is-font

Weekly Downloads

4

Version

1.1.0

License

MIT

Last publish

Collaborators

  • awcross