dist/angular-ui-tree-filter.js
function visit(collection, pattern, address) {
                collection = collection || [];
                var foundSoFar = false;

                collection.forEach(function (collectionItem) {
                    foundSoFar = foundSoFar || testForField(collectionItem, pattern, address);
                });

                return foundSoFar;
            }
function visit(collection, pattern, address) {
                collection = collection || [];
                var foundSoFar = false;

                collection.forEach(function (collectionItem) {
                    foundSoFar = foundSoFar || testForField(collectionItem, pattern, address);
                });

                return foundSoFar;
            }
function visit ( collection , pattern , address ) { collection = collection || [ ] ; var foundSoFar = false ; collection . forEach ( function ( collectionItem ) { foundSoFar = foundSoFar || testForField ( collectionItem , pattern , address ) ; } ) ; return foundSoFar ; }
Iterates through given collection if flag is not true and sets a flag to true on first match.

@param {Array}   collection
@param {string}  pattern
@param {string}  address

@returns {boolean}
Iterates through given collection if flag is not true and sets a flag to true on first match .