UNPKG

@codibre/fluent-iterable

Version:

Provides LINQ-like fluent api operations for iterables and async iterables (ES2018+).

10 lines (9 loc) 264 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.forEach = forEach; function forEach(mapper) { const iterator = this[Symbol.iterator](); let item; while (!(item = iterator.next()).done) mapper(item.value); }