Check if a DOM element matches a given selector, with decent browser support and unit tests.
Check if an element matches a given selector. For use with browserify.
$ npm install matches-selector
var matches = ;;// => true or false
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 installnpm test
To re-run tests after making changes, just refresh your browser