# css-list-helpers

> Helper methods for splitting CSS lists (e.g., spaces, commas).

Latest version **2.0.0** (published 2018-05-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install css-list-helpers
pnpm add css-list-helpers
yarn add css-list-helpers
bun add css-list-helpers
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-05-04 |
| First published | 2015-10-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Jed Mao |
| Maintainers | jedmao |
| Keywords | css, list, helpers, split, space, comma |

## Links

- npm: https://www.npmjs.com/package/css-list-helpers
- Repository: https://github.com/jedmao/css-list-helpers
- Homepage: https://github.com/jedmao/css-list-helpers#readme
- Issues: https://github.com/jedmao/css-list-helpers/issues
- npm.io page: https://npm.io/package/css-list-helpers

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2018-05-04
- 1.0.1 — 2015-10-02
- 1.0.0 — 2015-10-02

## README

# css-list-helpers

[![NPM version](http://img.shields.io/npm/v/css-list-helpers.svg?style=flat)](https://www.npmjs.org/package/css-list-helpers)
[![npm license](http://img.shields.io/npm/l/css-list-helpers.svg?style=flat-square)](https://www.npmjs.org/package/css-list-helpers)
[![Travis Build Status](https://img.shields.io/travis/jedmao/css-list-helpers.svg?label=unix)](https://travis-ci.org/jedmao/css-list-helpers)
[![codecov](https://codecov.io/gh/jedmao/css-list-helpers/branch/master/graph/badge.svg)](https://codecov.io/gh/jedmao/css-list-helpers)

[![npm](https://nodei.co/npm/css-list-helpers.svg?downloads=true)](https://nodei.co/npm/css-list-helpers/)

Helper methods for splitting CSS lists (i.e., by spaces or commas), extracted from [PostCSS#list](https://github.com/postcss/postcss/blob/master/lib/list.es6).

## Installation

```
$ npm install css-list-helpers [--save[-dev]]
```

## Usage

```js
var listHelpers = require('css-list-helpers');

listHelpers.splitBySpaces(' 0 a(b / c) "d e" ');
// ['0', 'a(b / c)', '"d e"']

listHelpers.splitByCommas(' 0, a(b / c), "d e" ');
// ['0', 'a(b / c)', '"d e"']

listHelpers.split('a/fn(b / c)', ['/']);
// ['a', 'fn(b / c)']
```

### ES6/2015 import

```ts
import * as listHelpers from 'css-list-helpers';
```

## Docs

This project provides first-class TypeScript support via generated TypeScript
definitions, included with the package. As such, you shouldn't have to
look-up documentation in your editor, so long as your editor supports
TypeScript.

## Testing

```
$ npm test
```

This will run tests and generate a code coverage report. Anything less than 100% coverage will throw an error.

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