Skip to content

Releases: Smoren/itertools-ts

Publication on DENO

06 Sep 13:15

Choose a tag to compare

v2.3.1

DENO publication added.

infinite.booleans() added, typing fixes

06 Sep 11:49
73481f5

Choose a tag to compare

New features

  • infinite
    • booleans()
    • booleansAsync()
  • Stream
    • ofBooleans()
  • AsyncStream
    • ofBooleans()

Typing fixes

  • Using built-in PropertyKey instead of RecordKey
  • FlatMapper types fixed (for single.flatMap())

combinatorics.combinations() added

30 Jan 22:11

Choose a tag to compare

New features

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

New namespace added: combinatorics

29 Jan 10:59

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

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

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

Choose a tag to compare

New features

  • Pipe
    • add()

Documentation fixed

23 Dec 19:47

Choose a tag to compare

v1.28.1

CHANGELOG updated.

createPipe() function added

22 Dec 09:26

Choose a tag to compare

New features

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

Package Size Optimization

03 Mar 10:52

Choose a tag to compare

v1.27.1

workflow updated