function cachedContains(array, fromIndex, largeSize) {
    fromIndex || (fromIndex = 0);

    var length = array.length,
        isLarge = (length - fromIndex) >= (largeSize || largeArraySize),
        cache = isLarge ? {} : array;

    if (isLarge) {
      // init value cache
      var key,
          index = fromIndex - 1;

      while (++index < length) {
        // manually coerce `value` to string because `hasOwnProperty`, in some
        // older versions of Firefox, coerces objects incorrectly
        key = array[index] + '';
        (hasOwnProperty.call(cache, key) ? cache[key] : (cache[key] = [])).push(array[index]);
      }
    }
    return function(value) {
      if (isLarge) {
        var key = value + '';
        return hasOwnProperty.call(cache, key) && indexOf(cache[key], value) > -1;
      }
      return indexOf(cache, value, fromIndex) > -1;
    }
  }
Creates a new function optimized for searching large arrays for a given `value`,
starting at `fromIndex`, using strict equality for comparisons, i.e. `===`.

@private
@param {Array} array The array to search.
@param {Mixed} value The value to search for.
@param {Number} [fromIndex=0] The index to start searching from.
@param {Number} [largeSize=30] The length at which an array is considered large.
@returns {Boolean} Returns `true` if `value` is found, else `false`.