How to use the iter-tools.map function in iter-tools

To help you get started, we’ve selected a few iter-tools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github conartist6 / sequins / src / sequence-keyed.js View on Github external
mapEntries(mapFn) {
    this.__transforms.push(map((entry, i) => mapFn(entry, i)));
    return this;
  }
github conartist6 / sequins / src / sequence-indexed.js View on Github external
*entries() {
    yield* map((value, i) => [i, value], this);
  }
}
github conartist6 / sequins / src / sequence-keyed.js View on Github external
mapKeys(mapFn) {
    this.__transforms.push(map(([key, value]) => [mapFn(key, value), value]));
    return this;
  }
github conartist6 / sequins / src / sequence-indexed.js View on Github external
map(mapFn) {
    this.__transforms.push(map(mapFn));
    return this;
  }
github conartist6 / sequins / src / sequence-set.js View on Github external
map(mapFn) {
    this.__transforms.push(map(item => mapFn(item)));
    return this;
  }
github conartist6 / sequins / src / sequence-keyed.js View on Github external
map(mapFn) {
    this.__transforms.push(map(([key, value]) => [key, mapFn(value, key)]));
    return this;
  }
github conartist6 / sequins / src / sequence-keyed.js View on Github external
*values() {
    yield* map(([_, value]) => value, this);
  }