Nearly Perpendicular Macaroons
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

parse-css-font

3.0.2 • Public • Published

parse-css-font

NPM version npm license Travis Build Status

npm

Parses the CSS font property.

Installation

$ npm install parse-css-font [--save[-dev]]

Usage

var parseCSSFont = require('parse-css-font');
parseCSSFont('1rem "Roboto Condensed", sans-serif;');
/*
{
    size: '1rem',
    family: ['Roboto Condensed', 'sans-serif'],
    style: 'normal',
    variant: 'normal',
    weight: 'normal',
    stretch: 'normal',
    lineHeight: 'normal'
}
*/

See the tests for more scenarios.

ES6/2015 import

import parseCSSFont from 'parse-css-font';

Testing

$ npm test

This will run tests and generate a code coverage report. Anything less than 100% coverage will throw an error.

install

npm i parse-css-font

Downloadsweekly downloads

27,800

version

3.0.2

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar