Skip to content

bloodyowl/matches

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

matches

browser support

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()
}

About

checks if element matches selector

Resources

License

Stars

Watchers

Forks

Packages

No packages published