# in-selector

> [![npm](https://img.shields.io/npm/v/in-selector.svg)](https://www.npmjs.com/package/in-selector) [![Node.js CI status](https://github.com/fengzilong/in-selector/workflows/Node.js%20CI/badge.svg)](https://github.com/fengzilong/in-selector/actions)

Latest version **0.1.0** (published 2021-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install in-selector
pnpm add in-selector
yarn add in-selector
bun add in-selector
```

## 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.0 |
| Published | 2021-09-03 |
| First published | 2021-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | fengzilong1992@gmail.com |
| Maintainers | fengzilong |

## Links

- npm: https://www.npmjs.com/package/in-selector
- npm.io page: https://npm.io/package/in-selector

## Dependencies (1)

- [postcss-selector-parser](https://npm.io/package/postcss-selector-parser.md) ^6.0.6

## Recent versions

- 0.1.0 (latest) — 2021-09-03
- 0.0.0 — 2021-09-02

## README

# in-selector

[![npm](https://img.shields.io/npm/v/in-selector.svg)](https://www.npmjs.com/package/in-selector) [![Node.js CI status](https://github.com/fengzilong/in-selector/workflows/Node.js%20CI/badge.svg)](https://github.com/fengzilong/in-selector/actions)

is a given id/classname/tag in a css selector string

# Installation

```bash
npm i in-selector
```

or

```bash
yarn add in-selector
```

# Usage

```js
const { inSelector } = require( 'in-selector' )

inSelector( '.a', '.a, .b' ) // -> true, check class
inSelector( '#b', '#a, #b:hover' ) // -> true, check id
inSelector( 'div', '.klass > div' ) // -> true, check tag
inSelector( '*', 'html *, body' ) // -> true, check universal
```

# License

MIT

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