Skip to content

Releases: Smoren/itertools-ts

combinatorics.combinations() added

30 Jan 22:11
Compare
Choose a tag to compare

New features

  • combinatorics
    • combinations()
    • combinationsAsync()
  • Stream
    • combinations()
  • AsyncStream
    • combinations()

New namespace added: combinatorics

29 Jan 10:59
Compare
Choose a tag to compare

New features

  • combinatorics
    • permutations()
    • permutationsAsync()
    • cartesianProduct()
    • cartesianProductAsync()
  • Stream
    • permutations()
  • AsyncStream
    • permutations()

Improvements

  • toArray() function optimized.

Deprecations

  • set
    • cartesianProduct() (use combinatorics.cartesianProduct() instead).
    • cartesianProductAsync() (use combinatorics.cartesianProductAsync() instead).

Stream and AsyncStream made generics to save the typing

25 Jan 20:24
Compare
Choose a tag to compare

Improvements

  • Stream and AsyncStream are fully refactored
    • Classes made generic.
    • All the methods made generic and save the typing.
  • reduce
    • toValue(), toValueAsync() — union return type has been replaced by inferred type.
    • toRange(), toRangeAsync() — use Numeric type in arguments.
  • multi
    • Type ZipTuple — added support for iterators and async iterables / iterators.
  • math
    • All the methods use Numeric type in arguments.
  • All the tests are refactored to check the typing.
  • Found bugs fixed.

New features

  • types
    • Numeric
    • NumericString

Union return type in groupBy replaced by inferred type

23 Jan 09:11
Compare
Choose a tag to compare

Improvements

  • single
    • groupBy() — union return type has been replaced by inferred type.
    • groupByAsync() — union return type has been replaced by inferred type.
function* groupBy<
  T,
  TItemKeyFunction extends ((item: T) => string) | undefined,
  TResultItem extends TItemKeyFunction extends undefined ? [string, Array<T>] : [string, Record<string, T>]
>(
  data: Iterable<T> | Iterator<T>,
  groupKeyFunction: (item: T) => string,
  itemKeyFunction?: TItemKeyFunction
): Iterable<TResultItem>;

async function* groupByAsync<
  T,
  TItemKeyFunction extends ((item: T) => string) | undefined,
  TResultItem extends TItemKeyFunction extends undefined ? [string, Array<T>] : [string, Record<string, T>]
>(
  data: AsyncIterable<T> | AsyncIterator<T> | Iterable<T> | Iterator<T>,
  groupKeyFunction: (item: T) => (string | Promise<string>),
  itemKeyFunction?: (item: T) => (string | Promise<string>)
): AsyncIterable<TResultItem>;

Pipe.add() method added

23 Dec 23:24
Compare
Choose a tag to compare

New features

  • Pipe
    • add()

Documentation fixed

23 Dec 19:47
Compare
Choose a tag to compare
v1.28.1

CHANGELOG updated.

createPipe() function added

22 Dec 09:26
Compare
Choose a tag to compare

New features

  • createPipe() — a way to chain multiple operations together.

Package Size Optimization

03 Mar 10:52
Compare
Choose a tag to compare
v1.27.1

workflow updated

set.cartesianProduct() added

13 Nov 10:16
Compare
Choose a tag to compare

New features

  • set
    • cartesianProduct()
    • cartesianProductAsync()
  • Stream
    • cartesianProductWith()
  • AsyncStream
    • cartesianProductWith()

infinite.cycle() added

12 Nov 22:42
Compare
Choose a tag to compare

New features

  • infinite
    • cycle()
    • cycleAsync()
  • Stream
    • ofCycle()
  • AsyncStream
    • ofCycle()