bloody-matches
v0.0.1
Published
matches selectors for every browser who supports `querySelectorAll`
Downloads
3
Readme
matches
matches selectors for every browser who supports querySelectorAll
install
$ npm install bloody-matches
require
var matches = require("bloody-matches")
api
matches(selector, element) > boolean
checks if element
matches the given selector
string.
selector as first argument has been chosen for simpler use of partial/curry.
example
var isAction = curry(matches, ".js-Action")
if(isAction(target)) {
target.focus()
}