Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*keys() {
yield* map((_, i) => i, this);
}
mapEntries(mapFn) {
this.__transforms.push(map((entry, i) => mapFn(entry, i)));
return this;
}
*entries() {
yield* map((value, i) => [i, value], this);
}
}
mapKeys(mapFn) {
this.__transforms.push(map(([key, value]) => [mapFn(key, value), value]));
return this;
}
map(mapFn) {
this.__transforms.push(map(mapFn));
return this;
}
map(mapFn) {
this.__transforms.push(map(item => mapFn(item)));
return this;
}
map(mapFn) {
this.__transforms.push(map(([key, value]) => [key, mapFn(value, key)]));
return this;
}
*values() {
yield* map(([_, value]) => value, this);
}