Nut is a concise query selector engine that just allows you to do extremely simple queries.
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 nut('#foo');
Of course, queries can have a context :
// Get nodes from the #foo context nut('.bar p',nut('#foo'));
And that's all you need to know ;)
Nut is compatible with ender and supports some useful syntax.
Selecting nodes, as usually:
$('#foo'); $('.bar p',$('#foo'));
Selecting existing nodes:
var nodes=$('.bar'); $(nodes);
Nut is published under the MIT license.