# has-pseudo-class

> Determine whether a selector contains a pseudo-class

Latest version **4.0.0** (published 2020-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install has-pseudo-class
pnpm add has-pseudo-class
yarn add has-pseudo-class
bun add has-pseudo-class
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2020-12-08 |
| First published | 2015-01-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2814 |
| Author | John Otander |
| Maintainers | johno |
| Keywords | css, pseudo, class, has |

## Links

- npm: https://www.npmjs.com/package/has-pseudo-class
- Repository: https://github.com/cssstats/cssstats
- Homepage: https://github.com/cssstats/cssstats#readme
- Issues: https://github.com/cssstats/cssstats/issues
- npm.io page: https://npm.io/package/has-pseudo-class

## Dependencies (1)

- [pseudo-classes](https://npm.io/package/pseudo-classes.md) 1.0.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

- 4.0.0 (latest) — 2020-12-08
- 3.5.0 — 2020-11-03
- 3.3.1 — 2019-07-26
- 3.3.0 — 2019-03-23
- 1.0.1 — 2015-12-15
- 0.0.1 — 2015-01-20

## README

# has-pseudo-class

Determine whether a selector contains a pseudo-class.

## Installation

```bash
npm install --save has-pseudo-class
```

## Usage

```javascript
var hasPseudoClass = require('has-pseudo-class')

hasPseudoClass('.some-selector:first-child') // => true
hasPseudoClass('.some-selector:not(.active)') // => true
hasPseudoClass('.some-selector') // => false
```

## License

MIT

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Crafted with <3 by John Otander ([@4lpine](https://twitter.com/4lpine)).

---

> This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).

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