src/js/orb.utils.js
function(array, predicate) {
        if (this.isArray(array) && predicate) {
            for (var i = 0; i < array.length; i++) {
                var item = array[i];
                if (predicate(item)) {
                    return item;
                }
            }
        }
        return undefined;
    }
function(array, predicate) {
        if (this.isArray(array) && predicate) {
            for (var i = 0; i < array.length; i++) {
                var item = array[i];
                if (predicate(item)) {
                    return item;
                }
            }
        }
        return undefined;
    }
function ( array , predicate ) { if ( this . isArray ( array ) && predicate ) { for ( var i = 0 ; i < array . length ; i ++ ) { var item = array [ i ] ; if ( predicate ( item ) ) { return item ; } } } return undefined ; }
Returns the first element in the array that satisfies the given predicate
@param  {Array} array     the array to search
@param  {function} predicate Function to apply to each element until it returns true
@return {Object}           The first object in the array that satisfies the predicate or undefined.
Returns the first element in the array that satisfies the given predicate