Transform a style string to an object representation
Name | Type | Description | Status | Default |
---|---|---|---|---|
style | { String } | The style string | required |
Return { (Object) } The string object representation
import styleString2Object from 'coffeekraken-sugar/js/dom/styleString2Object'
const styleString = styleString2Object('padding-left:20px; display:block;');
// output => {
// paddingLeft : '20px',
// display : 'block'
// }
Author : Olivier Bossel [email protected] https://olivierbossel.com