css-font-face-src

A CSS @font-face src property value parser

css-font-face-src

A CSS @font-face src property value parser.

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' } ]

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