Detalhes do pacote

component-matches-selector

component37.7kMIT0.1.7

Check if an element matches a given selector

match, element, selector

readme (leia-me)

matches-selector

Check if an element matches a given selector.

Installation

$ component install component/matches-selector

Example

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

License

MIT

changelog (log de mudanças)

0.1.7 / 2019-04-21

  • using global-object to get global.Element so this code can be safely run inside of non-browser environments (#16, @antialias)

0.1.6 / 2016-04-01

  • index: fall back to require('component-query') (#15, @ockham)

0.1.5 / 2014-07-27

  • index: don't throw an Error when given falsey or non-Element nodes

0.1.4 / 2014-05-27

  • force re-publish since something happened with npm

0.1.3 / 2014-05-27

  • package: add "browser" field for browserify

0.1.2 / 2014-02-10

  • package: pin "component-query" version
  • package: add package.json file
  • component: beautify "keywords"

0.1.1 / 2013-10-15

  • use query.all() not query()
  • use proto.matches

0.1.0 / 2013-04-15

  • use component/query to support fallbacks