Erster Docker-Stand
This commit is contained in:
23
_node_modules/fast-check/lib/stream/LazyIterableIterator.js
generated
Normal file
23
_node_modules/fast-check/lib/stream/LazyIterableIterator.js
generated
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.makeLazy = makeLazy;
|
||||
class LazyIterableIterator {
|
||||
constructor(producer) {
|
||||
this.producer = producer;
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
if (this.it === undefined) {
|
||||
this.it = this.producer();
|
||||
}
|
||||
return this.it;
|
||||
}
|
||||
next() {
|
||||
if (this.it === undefined) {
|
||||
this.it = this.producer();
|
||||
}
|
||||
return this.it.next();
|
||||
}
|
||||
}
|
||||
function makeLazy(producer) {
|
||||
return new LazyIterableIterator(producer);
|
||||
}
|
||||
Reference in New Issue
Block a user