lib/eachOf.js
// eachOf implementation optimized for array-likes
eachOf implementation optimized for array-likes
eachOf implementation optimized for array - likes
function eachOfArrayLike(coll, iteratee, callback) {
    callback = once(callback || noop);
    var index = 0,
        completed = 0,
        {length} = coll,
        canceled = false;
    if (length === 0) {
        callback(null);
    }
    function iteratorCallback(err, value) {
        if (err === false) {
            canceled = true
        }
        if (canceled === true) return
        if (err) {
            callback(err);
        } else if ((++completed === length) || value === breakLoop) {
            callback(null);
        }
    }
    for (; index < length; index++) {
        iteratee(coll[index], index, onlyOnce(iteratorCallback));
    }
}
function eachOfArrayLike ( coll , iteratee , callback ) { callback = once ( callback || noop ) ; var index = 0 , completed = 0 , { length } = coll , canceled = false ; if ( length === 0 ) { callback ( null ) ; } function iteratorCallback ( err , value ) { if ( err === false ) { canceled = true } if ( canceled === true ) return if ( err ) { callback ( err ) ; } else if ( ( ++ completed === length ) || value === breakLoop ) { callback ( null ) ; } } for ( ; index < length ; index ++ ) { iteratee ( coll [ index ] , index , onlyOnce ( iteratorCallback ) ) ; } }
eachOf implementation optimized for array-likes
eachOf implementation optimized for array - likes