app php01 790c53caa0 最后一版uniaiim 10 tháng trước cách đây
..
coverage 790c53caa0 最后一版uniaiim 10 tháng trước cách đây
dist 790c53caa0 最后一版uniaiim 10 tháng trước cách đây
CHANGELOG.md 790c53caa0 最后一版uniaiim 10 tháng trước cách đây
LICENSE 790c53caa0 最后一版uniaiim 10 tháng trước cách đây
README.md 790c53caa0 最后一版uniaiim 10 tháng trước cách đây
package.json 790c53caa0 最后一版uniaiim 10 tháng trước cách đây

README.md

parse-css-font

NPM version npm license Travis Build Status codecov BundlePhobia Minified Unicorn Approved

npm

Parses the CSS font property.

Installation

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

Usage

const 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.