Sha256: f601a82dd0ce2fc37da24c5e2d050c4b514d956a0e7b4310b4fbc4f000a639f6
Contents?: true
Size: 584 Bytes
Versions: 69
Compression:
Stored size: 584 Bytes
Contents
/** * 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; } module.exports = indexOf;
Version data entries
69 entries across 69 versions & 2 rubygems