9 lines
172 B
JavaScript
9 lines
172 B
JavaScript
export default function(callback, that) {
|
|
let index = -1;
|
|
for (const node of this) {
|
|
if (callback.call(that, node, ++index, this)) {
|
|
return node;
|
|
}
|
|
}
|
|
}
|