JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 24219
  • Score
    100M100P100Q14198F
  • License BSD-like

a rtl CSS selector engine

Package Exports

  • CSSselect

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (CSSselect) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

#CSSselect Build Status

##What?

CSSselect is CSS selector engine. It returns a function that tests elements if they match a selector - checking needs to happen "from the top", like browser engines execute queries.

##Why?

Just take the following CSS query: foo bar baz. When the element named baz has like a billion children, every one of them needs to be checked if they match a query. Three times, to be precise, if you run a CSS query from the start to the end (as e.g. JSDOM does). Yup, that's slow.

This library checks every element once. The more complex the query, the greater the benefit.

##How?

By stacking functions!

##TODO

  1. The API needs to be improved
  2. Documentation needs to be written