UNPKG

@daiso-tech/core

Version:

The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.

22 lines 617 B
/** * @module Collection */ import {} from "../../../../collection/contracts/_module-exports.js"; import { resolveInvokable } from "../../../../utilities/_module-exports.js"; /** * @internal */ export class AsyncMapIterable { collection; mapFn; constructor(collection, mapFn) { this.collection = collection; this.mapFn = mapFn; } async *[Symbol.asyncIterator]() { for await (const [index, item] of this.collection.entries()) { yield resolveInvokable(this.mapFn)(item, index, this.collection); } } } //# sourceMappingURL=async-map-iterable.js.map