digger-find
The client side find function for digger container trees.
Examples
find
Find containers in local data:
var children_data = name:"Superman" rating:78 _children: name:"flying" name:"strength" name:"Spiderman" rating:79 _children: name:"spinwebs" name:"spidersense" var superheroes = ; var spiderman = superheroes;
sort
Sort containers by function or fieldname - asc only at present:
By field:
var superheroes = ; // title is defaultvar byname = superheroes; // sort by fieldnamevar byrating = superheroes;
filter
Return a container with the models that return true from the provided function
If the function is a string then do 'container.match' on it.
By field:
var superheroes = ; var some = superheroes var byselector = superheroes;
match
Returns true if a given container matches the given selector.
var superheroes = ; var spiderman = superheroes; ifspiderman // spiderman is super!