dist/bower_components/lazy.js/lazy.js
function arrayContainsBefore(array, element, index, keyFn) {
    var i = -1;

    if (keyFn) {
      keyFn = createCallback(keyFn);
      while (++i < index) {
        if (keyFn(array[i]) === keyFn(element)) {
          return true;
        }
      }

    } else {
      while (++i < index) {
        if (array[i] === element) {
          return true;
        }
      }
    }

    return false;
  }
function arrayContainsBefore(array, element, index, keyFn) {
    var i = -1;

    if (keyFn) {
      keyFn = createCallback(keyFn);
      while (++i < index) {
        if (keyFn(array[i]) === keyFn(element)) {
          return true;
        }
      }

    } else {
      while (++i < index) {
        if (array[i] === element) {
          return true;
        }
      }
    }

    return false;
  }
function arrayContainsBefore ( array , element , index , keyFn ) { var i = - 1 ; if ( keyFn ) { keyFn = createCallback ( keyFn ) ; while ( ++ i < index ) { if ( keyFn ( array [ i ] ) === keyFn ( element ) ) { return true ; } } } else { while ( ++ i < index ) { if ( array [ i ] === element ) { return true ; } } } return false ; }
Checks if an element exists in an array before a given index.

@private
@param {Array} array
@param {*} element
@param {number} index
@param {Function} keyFn
@returns {boolean}

@examples
arrayContainsBefore([1, 2, 3], 3, 2) // => false
arrayContainsBefore([1, 2, 3], 3, 3) // => true
Checks if an element exists in an array before a given index .