The concise CSS selector engine
Nut is a concise query selector engine that just allows you to do extremely simple queries.
You can pick the minified library or install it with :
jam install nutbower install nutnpm install nut --save-dev
querySelectorAll and then faster than all selector engines. Nut does not implement request caching, to avoid unecessary code additions and performance loss, because the user can easily keep a request and pass it as a context to another request.
Here's it can handle :
#foosection.bar psection #foo .bar pdiv, #foo, .bar
And here's it can't :
div *div#foo div.bardiv > pdiv + p
So, all pseudo-classes, attribute selectors and other advanced syntax are not allowed. But, let's dig in it :
// Return an array;
Of course, queries can have a context :
// Get nodes from the #foo context;
And that's all you need to know ;)
Nut is compatible with ender and supports some useful syntax.
Selecting nodes, as usually:
Selecting existing nodes:
Nut is published under the MIT license.