# matches-selector

> Check if a DOM element matches a given selector, with decent browser support and unit tests.

Latest version **1.2.0** (published 2017-06-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install matches-selector
pnpm add matches-selector
yarn add matches-selector
bun add 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 | 1.2.0 |
| Published | 2017-06-23 |
| First published | 2013-03-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Maintainers | forbeslindesay |
| Keywords | browserify, CSS, selector |

## Links

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

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

- 1.2.0 (latest) — 2017-06-23
- 1.1.0 — 2017-06-23
- 1.0.0 — 2013-12-31
- 0.0.2 — 2013-10-19
- 0.0.1 — 2013-03-13

## README

# matches-selector

Check if an element matches a given selector.  For use with browserify.

[![Dependency Status](https://gemnasium.com/ForbesLindesay/matches-selector.png)](https://gemnasium.com/ForbesLindesay/matches-selector)
[![NPM version](https://badge.fury.io/js/matches-selector.png)](http://badge.fury.io/js/matches-selector)

[![browser support](https://ci.testling.com/ForbesLindesay/matches-selector.png)](https://ci.testling.com/ForbesLindesay/matches-selector)

## Installation

    $ npm install matches-selector

## Example

```js
var matches = require('matches-selector');
matches(el, 'ul li a');
// => true or false
```

## Running Tests

Tests can be easilly run locally in the browser of your choice, and have passed if it ends with `# ok`.  They are also run on testling-ci when pushed to the repository:

```
npm install
npm test
```

To re-run tests after making changes, just refresh your browser

## License

  MIT

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