Sha256: 594b6da7977165bb40833b0ab6ef04a855eb236aa13cefe6b3c147f8ad8a61be
Contents?: true
Size: 597 Bytes
Versions: 69
Compression:
Stored size: 597 Bytes
Contents
define(function () { /** * Array.indexOf */ function indexOf(arr, item, fromIndex) { fromIndex = fromIndex || 0; if (arr == null) { return -1; } var len = arr.length, i = fromIndex < 0 ? len + fromIndex : fromIndex; while (i < len) { // we iterate over sparse items since there is no way to make it // work properly on IE 7-8. see #64 if (arr[i] === item) { return i; } i++; } return -1; } return indexOf; });
Version data entries
69 entries across 69 versions & 2 rubygems