Check if an element matches a given selector string
JavaScript
Pull request Compare This branch is 12 commits ahead, 26 commits behind component:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
LICENSE Add LICENSE file Dec 30, 2013
Readme.md Make all the tests work locally Dec 30, 2013
index.js
package.json

Readme.md

matches-selector

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

Dependency Status NPM version

browser support

Installation

$ npm install matches-selector

Example

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