| 1 2 3 4 5 6 7 8 9 10 11 12 | 3 3 12 12 | function *thru(xs, iteratee, thisArg) {
let fn = thisArg ? iteratee.bind(thisArg) : iteratee;
let i = 0;
for (let x of xs) {
yield fn(x, i, xs);
i += 1;
}
}
export default thru;
|