matches-selector-ng
v1.1.0
Published
Check if a DOM element matches a given selector, with decent browser support and unit tests.
Downloads
93,905
Readme
matches-selector-ng
Check if an element matches a given selector. Uses the native
matches
method
if present. For use with a commonjs bundler such as Browserify or Webpack.
Installation
$ yarn add matches-selector-ng
Example
var matches = require('matches-selector-ng');
matches(el, 'ul li a');
// => true or false
Types
Both TypeScript and Flow type definitions for this module are included! The type definitions won't require any configuration to use.