1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | /**
|
4 | * An iterator that emits results by running each element through a provided predicate
|
5 | */
|
6 | class MapIterator {
|
7 | constructor(source, iteratee) {
|
8 | this.source = source;
|
9 | this.iteratee = iteratee;
|
10 | }
|
11 | next() {
|
12 | const { value, done } = this.source.next();
|
13 | return { value: !done && this.iteratee(value), done };
|
14 | }
|
15 | }
|
16 | exports.MapIterator = MapIterator;
|
17 | //# sourceMappingURL=map.js.map |
\ | No newline at end of file |