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 nut bower install nut npm install nut --save-dev
Oh jeez, another engine?!
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 :
#foo section .bar p section #foo .bar p div, #foo, .bar
And here's it can't :
div * div#foo div.bar div > p div + 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.