node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org »

css-font-face-src

css-font-face-src

NPM version

A CSS @font-face src property value parser.

Example

var parser = require('css-font-face-src');
 
parser.parse('local("The Font"), url("font.otf") format("opentype"), url("font.woff"), local("Another Font")');

will return

[ { local: 'The Font' },
  { url: 'font.otf', format: 'opentype' },
  { url: 'font.woff' },
  { local: 'Another Font' } ]

Build Status

Author

Christoph Burgmer. Licensed under BSD-2-Clause. Reach out on Twitter.