# has-element-selector

> Check whether a given selector contains an element

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

## Install

```sh
npm install has-element-selector
pnpm add has-element-selector
yarn add has-element-selector
bun add has-element-selector
```

## 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 | 2016-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2814 |
| Author | John Otander |
| Maintainers | johno |

## Links

- npm: https://www.npmjs.com/package/has-element-selector
- 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-element-selector

## Dependencies (1)

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

## 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.0 — 2016-02-18

## README

# has-element-selector

Check whether a given selector contains an element

## Installation

```bash
npm install --save has-element-selector
```

## Usage

```javascript
var hasElementSelector = require('has-element-selector')

hasElementSelector('input') // => true
hasElementSelector('#foo ul.bar') // => true
hasElementSelector('#foo .bar.baz') // => 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)).

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