matchElement
Use native element selector matching. Matches element or can walk the DOM to check ancestor elements.
Installation
npm install properjs-matchelement --save-dev
Usage
var matchElement = ; // Test if element matches selectorif // It matches, do stuff with it // Test if element or parent/ancestor matches selectorif // It matches, do stuff with it