Skip to content

Releases: nvie/itertools

v2.7.1

Choose a tag to compare

@github-actions github-actions released this 21 May 18:55
  • Fix: allow dynamic minCost function call on chunkedByCost, for dynamic cost functions that change over time.
  • Packaging fix: no longer trigger pnpm's "Ignored build scripts" warning in consumer projects.

v2.7.0

Choose a tag to compare

@github-actions github-actions released this 21 May 12:15
  • New custom helper: chunkedByCost(items, costOf, maxCost, minCost?), groups a stream of items into chunks bounded by a hard maxCost cap and an optional minCost soft target.
  • Drop support for Node 20.x (it probably still works, but it's EoL)

v2.6.0

Choose a tag to compare

@github-actions github-actions released this 01 Mar 12:49
  • Add new xrange, which is like range but returns an array directly instead of an iterable.

v2.5.0

Choose a tag to compare

@nvie nvie released this 10 Sep 20:21
  • New itertools: groupBy and indexBy
  • Renamed groupby to igroupby
  • Deprecated groupby (now an alias to igroupby)
  • Drop support for Node 18.x (it probably still works, but it's EoL)

v2.4.1

Choose a tag to compare

@nvie nvie released this 25 Feb 08:26
  • Use bundler module resolution setting (recommended setting for libraries that use a bundler)
  • Upgrade dev dependencies

v2.4.0

Choose a tag to compare

@nvie nvie released this 19 Feb 14:04
  • Add second param index to all predicates. This will make operations like partitioning a list based on the element position as easy as partitioning based on the element value, for example:
    const items = [1, 2, 3, 4, 5, 6, 7, 8, 9];
    const [thirds, rest] = partition(items, (item, index) => index % 3 === 0);
    console.log(thirds); // [1, 4, 7]
    console.log(rest); // [2, 3, 5, 6, 8, 9]
  • Officially drop Node 16 support (it may still work)

v2.3.2

Choose a tag to compare

@nvie nvie released this 27 May 06:42
  • Fix missing top-level exports for izipLongest3 and intersperse

v2.3.1

Choose a tag to compare

@nvie nvie released this 04 Apr 23:53
  • Actually export the new itertool at the top level

v2.3.0

Choose a tag to compare

@nvie nvie released this 04 Apr 23:50
  • Add new dupes(iterable, keyFn?) function, which returns groups of all duplicate items in iterable.

v2.2.5

Choose a tag to compare

@nvie nvie released this 07 Mar 08:09
  • Add missing export for repeat