veffect
Version:
powerful TypeScript validation library built on the robust foundation of Effect combining exceptional type safety, high performance, and developer experience. Taking inspiration from Effect's functional principles, VEffect delivers a balanced approach tha
30 lines • 490 B
JavaScript
/** @internal */
export class SingleShotGen {
self;
called = false;
constructor(self) {
this.self = self;
}
next(a) {
return this.called ? {
value: a,
done: true
} : (this.called = true, {
value: this.self,
done: false
});
}
return(a) {
return {
value: a,
done: true
};
}
throw(e) {
throw e;
}
[Symbol.iterator]() {
return new SingleShotGen(this.self);
}
}
//# sourceMappingURL=singleShotGen.js.map