Package Exports
- parse-css-dimension
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 (parse-css-dimension) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
parse-css-dimension
Parse a CSS dimension (i.e., number, length, percentage) into a JavaScript object.
Installation
$ npm install parse-css-dimension [--save[-dev]]Usage
var parseCssDimension = require('parse-css-dimension');
parseCssDimension('-3.4e-2'); // { type: 'number', value: -0.034 }
parseCssDimension('42em'); // { type: 'length', value: 42, unit: 'em' }
parseCssDimension('42%'); // { type: 'percentage', value: 42 }Testing
$ npm testThis will run tests and generate a code coverage report. Anything less than 100% coverage will throw an error.