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.

26 lines 749 B
/** * @module Collection */ import { isAsyncIterable, isIterable, } from "../../../../collection/implementations/_shared.js"; import {} from "../../../../collection/contracts/_module-exports.js"; /** * @internal */ export class AsyncCollapseIterable { collection; constructor(collection) { this.collection = collection; } async *[Symbol.asyncIterator]() { for await (const item of this.collection) { if (isIterable(item) || isAsyncIterable(item)) { // eslint-disable-next-line @typescript-eslint/no-explicit-any yield* item; } else { yield item; } } } } //# sourceMappingURL=async-collapse-iterable.js.map