Détail du package

matches-selector-ng

Macil92.8kMIT1.1.0

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

browserify, CSS, selector

readme

matches-selector-ng

GitHub license npm version CircleCI Status Greenkeeper badge

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.