https://github.com/ooade/css2object
Converts css to object/json (fun thang!) 🤔
https://github.com/ooade/css2object
css
Last synced: about 1 year ago
JSON representation
Converts css to object/json (fun thang!) 🤔
- Host: GitHub
- URL: https://github.com/ooade/css2object
- Owner: ooade
- Created: 2019-09-29T18:02:12.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-25T07:27:30.000Z (almost 2 years ago)
- Last Synced: 2025-03-29T08:33:10.550Z (over 1 year ago)
- Topics: css
- Language: TypeScript
- Size: 417 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
CSS To Object/JSON
## Installation
```sh
npm add css2object
```
## Usage
```js
import Css2Object from 'css2object';
const cssData = `
h1 {
color: blue;
}
body {
color: red;
}
`
const css2json = new Css2Object(cssData);
css2json.read();
console.log(css2json.cssRecord);
```
## LICENSE
MIT