# css-obj

> Parse css to js obj model

Latest version **0.0.1** (published 2014-09-03) · 0 weekly downloads

## Install

```sh
npm install css-obj
pnpm add css-obj
yarn add css-obj
bun add css-obj
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2014-09-03 |
| First published | 2014-09-03 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | fritx |
| Keywords | css, obj, parse, convert, model |

## Links

- npm: https://www.npmjs.com/package/css-obj
- Repository: git@github.com:fritx/css-obj
- Homepage: https://github.com/fritx/css-obj
- Issues: https://github.com/fritx/css-obj/issues
- npm.io page: https://npm.io/package/css-obj

## Dependencies (1)

- [underscore](https://npm.io/package/underscore.md) ^1.7.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2014-09-03

## README

# css-obj

Parse css to js obj model

> It is very simple right now

It requires:

- no comments
- one space before `{`
- `}` or one key/value pair in each line
- strictly `{key}: {value};`
- so on ..

## Usage

Source:

```css
.hidden {
  display: none;
}
a:hover,
.btn.active {
  display: block;
  color: yellow;
}
```

Parsing:

```js
var parseCss = require('css-obj')
parseCss(css, function(err, obj){
  console.log(obj)
})
```

Outputs:

```js
[
  [
    '.hidden', {
      'display': 'none'
    }
  ],
  [
    'a:hover, .btn.active', {
      'display': 'block',
      'color': 'yellow'
    }
  ]
]
```

---
_Source: https://npm.io/package/css-obj · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
