avocado-old/packages/core/iterator.js

10 lines
152 B
JavaScript
Raw Normal View History

2019-11-25 03:32:05 -06:00
export function iterateForEach(it, fn) {
for (
let item = it.next();
item.done !== true;
item = it.next()
) {
fn(item.value);
}
}