lib/public/swagger/swagger-ui.js
function createBaseEach(eachFunc, fromRight) {
  return function(collection, iteratee) {
    var length = collection ? collection.length : 0;
    if (!isLength(length)) {
      return eachFunc(collection, iteratee);
    }
    var index = fromRight ? length : -1,
        iterable = toObject(collection);

    while ((fromRight ? index-- : ++index < length)) {
      if (iteratee(iterable[index], index, iterable) === false) {
        break;
      }
    }
    return collection;
  };
}
function createBaseEach(eachFunc, fromRight) {
  return function(collection, iteratee) {
    var length = collection ? collection.length : 0;
    if (!isLength(length)) {
      return eachFunc(collection, iteratee);
    }
    var index = fromRight ? length : -1,
        iterable = toObject(collection);

    while ((fromRight ? index-- : ++index < length)) {
      if (iteratee(iterable[index], index, iterable) === false) {
        break;
      }
    }
    return collection;
  };
}
function createBaseEach ( eachFunc , fromRight ) { return function ( collection , iteratee ) { var length = collection ? collection . length : 0 ; if ( ! isLength ( length ) ) { return eachFunc ( collection , iteratee ) ; } var index = fromRight ? length : - 1 , iterable = toObject ( collection ) ; while ( ( fromRight ? index -- : ++ index < length ) ) { if ( iteratee ( iterable [ index ] , index , iterable ) === false ) { break ; } } return collection ; } ; }
Creates a `baseEach` or `baseEachRight` function.

@private
@param {Function} eachFunc The function to iterate over a collection.
@param {boolean} [fromRight] Specify iterating from right to left.
@returns {Function} Returns the new base function.
Creates a baseEach or baseEachRight function .