matches-dom-selector

Check if an element matches a given selector string

matches-selector

Check if an element matches a given selector.

$ npm install matches-dom-selector
var matches = require('matches-selector');
matches(el, 'ul li a');
// => true 

MIT