UNPKG

941 BMarkdownView Raw
1# matches-selector
2
3Check if an element matches a given selector. For use with browserify.
4
5[![Dependency Status](https://gemnasium.com/ForbesLindesay/matches-selector.png)](https://gemnasium.com/ForbesLindesay/matches-selector)
6[![NPM version](https://badge.fury.io/js/matches-selector.png)](http://badge.fury.io/js/matches-selector)
7
8[![browser support](https://ci.testling.com/ForbesLindesay/matches-selector.png)](https://ci.testling.com/ForbesLindesay/matches-selector)
9
10## Installation
11
12 $ npm install matches-selector
13
14## Example
15
16```js
17var matches = require('matches-selector');
18matches(el, 'ul li a');
19// => true or false
20```
21
22## Running Tests
23
24Tests 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:
25
26```
27npm install
28npm test
29```
30
31To re-run tests after making changes, just refresh your browser
32
33## License
34
35 MIT