1.0.1 • Published 5 years ago

js-css-parser v1.0.1

Weekly downloads
15,879
License
ISC
Repository
github
Last release
5 years ago

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"
            }
        ]
    }
]
1.0.1

5 years ago

1.0.0

5 years ago