$ gnpm install postcss-values-parser
A CSS property value parser built upon PostCSS, following the same node and traversal patterns as PostCSS.
Using npm:
npm install postcss-values-parser --save-dev
 
Please consider becoming a patron if you find this module useful.
postcss-values-parser Node version v6.14.0+ and PostCSS v7.0.0+.
Using the parser is straightforward and minimalistic:
const { parse } = require('postcss-values-parser');
const root = parse('#fff');
const node = root.first;
// → Word {
//     raws: { before: '', after: '' },
//     value: '#fff',
//     type: 'word',
//     isHex: true,
//     isColor: true,
//     isVariable: false,
//     ...
//   }
Please see the Documentation for further information on using the module.
LICENSE (Mozilla Public License)
Copyright 2013 - present © cnpmjs.org | Home |