css-styles
Parse and stringify inlined CSS declarations
Example
const cssStyles =var styles = cssStylesconsole// {// background: '#bada55',// fontSize: '12px'// }var styleString = cssStylesconsole// 'position: absolute;'
Usage
cssStyles.parse(string)
Parse a string containing CSS declarations and returns an object. Keys will be camelCase.
cssStyles.stringify(styles={})
Convert an object containing CSS declarations in to a string. Keys will be decamelized.
Install
$ npm install css-styles
License
MIT