Sha256: 16e960d9322b03ddf938428e1db43b004360dbda296e2f184646910212d38599
Contents?: true
Size: 520 Bytes
Versions: 69
Compression:
Stored size: 520 Bytes
Contents
define(['../function/makeIterator_'], function (makeIterator) { /** * Returns the index of the first item that matches criteria */ function findIndex(arr, iterator, thisObj){ iterator = makeIterator(iterator, thisObj); if (arr == null) { return -1; } var i = -1, len = arr.length; while (++i < len) { if (iterator(arr[i], i, arr)) { return i; } } return -1; } return findIndex; });
Version data entries
69 entries across 69 versions & 2 rubygems