function indexOf(array, value) {
  if (Array.prototype.indexOf) {
    return array.indexOf(value, Number(arguments[2]) || 0);
  }
  var len = array.length >>> 0, from = Number(arguments[2]) || 0;
  from = (from < 0) ? Math.ceil(from) : Math.floor(from);

  if (from < 0) from += len;

  for (; from < len; from++) {
    if (from in array && array[from] === value) return from;
  }
  return -1;
}
IE8-safe wrapper for `Array.prototype.indexOf()`.

@param {Array} array A JavaScript array.
@param {*} value A value to search the array for.
@return {Number} Returns the array index value of `value`, or `-1` if not present.