jsonify-css
Installation
$ yarn add jsonify-css
Usage
// 1. Require the moduleconst jsonify = // 2. Pass it optionsconst toJSON = ; // 3. Parse some css textconst json = ; /* outputs the following:{ charset: [{ '@charset': 'UTF-8' }], rules: [{ '.foo': { width: '480px' } }, { '.bar': { width: '320px', color: 'red' } }], media: [{ '@media(max-width: 480px)': { '.foo': { 'max-width': '100%' } } }], keyframes: [ ['fade-in', { '0%,50%': { opacity: '0' }, to: { opacity: '1' } }] ], fontFace: [{ fontFamily: "'Open Sans'", fontStyle: 'normal', fontWeight: '400', src: "url(data:application/x-font-woff;charset=utf-8;base64,...)" }]} */