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.

24 lines 575 B
/** * @module Collection */ import {} from "@standard-schema/spec"; /** * @internal */ export class AsyncValidateIterable { iterable; schema; constructor(iterable, schema) { this.iterable = iterable; this.schema = schema; } async *[Symbol.asyncIterator]() { for await (const item of this.iterable) { const result = await this.schema["~standard"].validate(item); if (!result.issues) { yield result.value; } } } } //# sourceMappingURL=async-validate-iterable.js.map