function indexOf(array, value, fromIndex) {
    if (!array) {
      return -1;
    }
    var index = -1,
        length = array.length;

    if (fromIndex) {
      if (typeof fromIndex == 'number') {
        index = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) - 1;
      } else {
        index = sortedIndex(array, value);
        return array[index] === value ? index : -1;
      }
    }
    while (++index < length) {
      if (array[index] === value) {
        return index;
      }
    }
    return -1;
  }
Gets the index at which the first occurrence of `value` is found using
strict equality for comparisons, i.e. `===`. If the `array` is already
sorted, passing `true` for `isSorted` will run a faster binary search.

@static
@memberOf _
@category Arrays
@param {Array} array The array to search.
@param {Mixed} value The value to search for.
@param {Boolean|Number} [fromIndex=0] The index to start searching from or
 `true` to perform a binary search on a sorted `array`.
@returns {Number} Returns the index of the matched value or `-1`.
@example

_.indexOf([1, 2, 3, 1, 2, 3], 2);
// => 1

_.indexOf([1, 2, 3, 1, 2, 3], 2, 3);
// => 4

_.indexOf([1, 1, 2, 2, 3, 3], 2, true);
// => 2