# css-parse-properties

> Parse CSS properties into a simple array.

Latest version **0.1.5** (published 2016-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install css-parse-properties
pnpm add css-parse-properties
yarn add css-parse-properties
bun add css-parse-properties
```

## 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.1.5 |
| Published | 2016-09-03 |
| First published | 2016-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jamen Marz |
| Maintainers | jamen |
| Keywords | css, parse, properties |

## Links

- npm: https://www.npmjs.com/package/css-parse-properties
- Repository: https://github.com/jamen/css-parse-properties
- Issues: https://github.com/jamen/css-parse-properties/issues
- npm.io page: https://npm.io/package/css-parse-properties

## 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.1.5 (latest) — 2016-09-03
- 0.1.4 — 2016-09-02
- 0.1.3 — 2016-09-02
- 0.1.2 — 2016-09-02
- 0.1.1 — 2016-09-02
- 0.1.0 — 2016-09-01

## README

# css-parse-properties [![NPM version](https://badge.fury.io/js/css-parse-properties.svg)](https://npmjs.org/package/css-parse-properties) [![Build Status](https://travis-ci.org/jamen/css-parse-properties.svg?branch=master)](https://travis-ci.org/jamen/css-parse-properties)

> Parse CSS properties into a simple array structure.

```js
parse('border: 1px solid red');
// => ['border', ['1px', 'solid', 'red']]

parse('transform: scale(0.8) translate(-10px, 5px)');
// => ['transform', ['scale(0.8)', 'translate(-10px, 5px)']]

parse(['foo: bar oof', 'baz: qux']);
// => [['foo', ['bar', 'oof']],
// =>  ['baz', ['qux']]]
```

## Installation

```sh
$ npm install --save css-parse-properties
```

## API

### `parse(properties)`
Parse properties into a `[name, values]` format (examples below).
 - properties (`String`|`Array`): A property or array of properties to parse.

```js
parse('margin: 1px 2px');
// => ['margin', ['1px', '2px']]

parse([
  'margin: 1em 2.50em',
  'border: 2px solid red;',
  'transform: scale(0.5)'
]);
// => [['margin', ['1em', '2.50em'],
// =>  ['border', ['2px', 'solid', 'red']],
// =>  ['transform', ['scale(0.5)']]]
```

## License

MIT © [Jamen Marz](https://github.com/jamen)

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