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.

17 lines 484 B
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