js-css-parser
v1.0.1
Published
A simple CSS parser for JS
Downloads
4
Readme
JSCSSParser
A simple JS function which converts CSS code (as a string) to a javascript object
Getting Started
import JSCSSParser into your project.
npm i --save js-css-parser
Pass in CSS as a string and get a JS object returned.
Object Format
Example
With this as input
body { color: red }
Expect this as a result
[
{
selector: "body",
declarations: [
{
property: "color",
value: "red"
}
]
}
]