public/javascripts/yui/treeview/treeview.js
function(fn) {
        var values = [];
        for (var i in this._nodes) {
            if (this._nodes.hasOwnProperty(i)) {
                var n = this._nodes[i];
                if (fn(n)) {
                    values.push(n);
                }
            }
        }
        return (values.length) ? values : null;
    }
function(fn) {
        var values = [];
        for (var i in this._nodes) {
            if (this._nodes.hasOwnProperty(i)) {
                var n = this._nodes[i];
                if (fn(n)) {
                    values.push(n);
                }
            }
        }
        return (values.length) ? values : null;
    }
function ( fn ) { var values = [ ] ; for ( var i in this . _nodes ) { if ( this . _nodes . hasOwnProperty ( i ) ) { var n = this . _nodes [ i ] ; if ( fn ( n ) ) { values . push ( n ) ; } } } return ( values . length ) ? values : null ; }
Returns a collection of nodes that have passed the test function
passed as its only argument.
The function will receive a reference to each node to be tested.
@method getNodesBy
@param {function} a boolean function that receives a Node instance and returns true to add the node to the results list
@return {Array} the matching collection of nodes, null if no match
Returns a collection of nodes that have passed the test function passed as its only argument . The function will receive a reference to each node to be tested .