Skip to content

awcross/is-font

Repository files navigation

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('awesome.woff2');
//=> {ext: woff2, mime: application/font-woff}

isFont('fake.ttf');
//=> false

API

isFont(filepath)

Returns an object if true. False otherwise.

filepath

Type: string

Path to the file.

Supported file types

Related

License

MIT © Alex Cross

About

Detect if a file is a font

Resources

License

Stars

Watchers

Forks

Packages

No packages published