Skip to content

matthewmueller/CSSselect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##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

About

a CSS selector engine in JS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published