1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 1 1 14 14 32 32 14 14 14 1 | define(['./some'], function (some) { /** * Returns first item that matches criteria */ function find(arr, iterator, thisObj){ var needle, i = -1, n = arr.length, val; while (++i < n){ val = arr[i]; if (iterator.call(thisObj, val, i, arr)) { needle = val; break; } } return needle; } return find; }); |