# css-selector-tree

> A small helper to split CSS selectors into subjects and conditions

Latest version **0.0.2** (published 2016-10-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install css-selector-tree
pnpm add css-selector-tree
yarn add css-selector-tree
bun add css-selector-tree
```

## 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.2 |
| Published | 2016-10-25 |
| First published | 2016-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thomas Rasshofer |
| Maintainers | rasshofer |
| Keywords | css-selector-tree, css, complexity |

## Links

- npm: https://www.npmjs.com/package/css-selector-tree
- Repository: https://github.com/rasshofer/css-selector-tree
- Homepage: https://github.com/rasshofer/css-selector-tree#readme
- Issues: https://github.com/rasshofer/css-selector-tree/issues
- npm.io page: https://npm.io/package/css-selector-tree

## Dependencies (1)

- [css-selector-tokenizer](https://npm.io/package/css-selector-tokenizer.md) ^0.7.0

## 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

- 0.0.2 (latest) — 2016-10-25
- 0.0.1 — 2016-10-25

## README

# CSS Selector Tree

> A small helper to split CSS selectors into subjects and conditions

[![Build Status](https://travis-ci.org/rasshofer/cssSelectorTree.svg)](https://travis-ci.org/rasshofer/css-selector-tree)
[![Coverage Status](https://coveralls.io/repos/github/rasshofer/css-selector-tree/badge.svg)](https://coveralls.io/github/rasshofer/css-selector-tree)
[![Dependency Status](https://david-dm.org/rasshofer/css-selector-tree/status.svg)](https://david-dm.org/rasshofer/css-selector-tree)
[![Dependency Status](https://david-dm.org/rasshofer/css-selector-tree/dev-status.svg)](https://david-dm.org/rasshofer/css-selector-tree)

## Installation

```shell
npm install css-selector-tree --save-dev
```

## API

### cssSelectorTree.tree(selector)

Accepts a CSS selector and returns its tree (subject and conditions).

In case no valid CSS selector is provided, `false` is returned.

### cssSelectorTree.subject(selector)

Accepts a CSS selector and returns its subject.

In case no valid CSS selector is provided, `false` is returned.

### cssSelectorTree.conditions(selector)

Accepts a CSS selector and returns its conditions.

In case no valid CSS selector is provided, `false` is returned.

## Changelog

* 0.0.2
  * Update outdated dependencies
* 0.0.1
  * Initial version

## License

Copyright (c) 2016 [Thomas Rasshofer](http://thomasrasshofer.com/)  
Licensed under the MIT license.

See LICENSE for more info.

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