JSPM

css-font-parser-papandreou

0.2.3-patch1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1461
  • Score
    100M100P100Q113436F
  • License BSD

A parser for the CSS font value

Package Exports

  • css-font-parser-papandreou

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (css-font-parser-papandreou) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CSS font value parser

browser support

A simple parser for parsing CSS font values in JavaScript.

Installation

If you are using Node.js you can install the parser using:

$ npm install css-font-parser

If you are using an AMD loader you can include the src/parser.js directly into your project.

Usage

> var parse = require('css-font-parser');
> parse('15px sans-serif');

{
  'font-family': ['sans-serif'],
  'font-size': '15px'
}

> parse('15px/18px "Neue Helvetica", Helvetica, sans-serif');

{
  'font-family': ['Neue Helvetica', 'Helvetica', 'sans-serif'],
  'font-size': '15px',
  'line-height': '18px'
}

License

Licensed under the three-clause BSD license.