学习?学个屁 06c63c15cc 初始化提交 10 bulan lalu
..
coverage 06c63c15cc 初始化提交 10 bulan lalu
CHANGELOG.md 06c63c15cc 初始化提交 10 bulan lalu
LICENSE 06c63c15cc 初始化提交 10 bulan lalu
README.md 06c63c15cc 初始化提交 10 bulan lalu
package.json 06c63c15cc 初始化提交 10 bulan lalu

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.