michangarrito/apps/backend/node_modules/iterare/lib/map.js
rckrdmrd 97f407c661 [MIGRATION-V2] feat: Migrar michangarrito a estructura v2
- Prefijo v2: MCH
- TRACEABILITY-MASTER.yml creado
- Listo para integracion como submodulo

Workspace: v2.0.0 | SIMCO: v4.0.0
2026-01-10 11:28:54 -06:00

17 lines
500 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* An iterator that emits results by running each element through a provided predicate
*/
class MapIterator {
constructor(source, iteratee) {
this.source = source;
this.iteratee = iteratee;
}
next() {
const { value, done } = this.source.next();
return { value: !done && this.iteratee(value), done };
}
}
exports.MapIterator = MapIterator;
//# sourceMappingURL=map.js.map