# desandro-matches-selector

> matches/matchesSelector helper

Latest version **2.0.2** (published 2017-02-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install desandro-matches-selector
pnpm add desandro-matches-selector
yarn add desandro-matches-selector
bun add desandro-matches-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 | 2.0.2 |
| Published | 2017-02-10 |
| First published | 2014-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 29 |
| Author | David DeSandro |
| Maintainers | desandro |
| Keywords | DOM, matchesSelector, matches |

## Links

- npm: https://www.npmjs.com/package/desandro-matches-selector
- Repository: https://github.com/desandro/matches-selector
- Issues: https://github.com/desandro/matches-selector/issues
- npm.io page: https://npm.io/package/desandro-matches-selector

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2017-02-10
- 2.0.1 — 2016-01-13
- 2.0.0 — 2015-12-28
- 1.0.3 — 2015-03-02
- 1.0.2 — 2014-10-17

## README

# matchesSelector helper

[`matches`/`matchesSelector`](https://developer.mozilla.org/en-US/docs/Web/API/Element/matches) is pretty hot :fire:, but has [vendor-prefix baggage](http://caniuse.com/#feat=matchesselector) :handbag: :pouch:. This helper function takes care of that, without polyfilling or augmenting `Element.prototype`.

``` js
matchesSelector( elem, selector );
// for example
matchesSelector( myElem, 'div.my-hawt-selector' );
```

## Install

Download [matches-selector.js](https://github.com/desandro/matches-selector/raw/master/matches-selector.js)

Install with [Bower](http://bower.io): `bower install matches-selector`

[Install with npm](https://www.npmjs.org/package/desandro-matches-selector): `npm install desandro-matches-selector`

## Browser support

IE10+, all modern browsers

Use [matchesSelector v1](https://github.com/desandro/matches-selector/releases/tag/v1.0.3) for IE8 and IE9 support.

## MIT license

matchesSelector is released under the [MIT license](http://desandro.mit-license.org)

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