Skip to content

Releases: Smoren/itertools-ts

Namespace summary: isEmpty() added

30 Dec 21:01
e88523a

Choose a tag to compare

New features

  • summary
    • isEmpty()
    • isEmptyAsync()
  • Stream
    • isEmpty()
  • AsyncStream
    • isEmpty()

Patch for Deno version fix

30 Dec 19:17
43ea955

Choose a tag to compare

Merge pull request #97 from Smoren/dev

Deno version fix, patch release

Namespace random: percentage, booleans added

29 Dec 14:09
d6aa3f2

Choose a tag to compare

New features

  • random
    • percentage()
    • percentageAsync()
    • booleans()
    • booleansAsync()
  • Stream
    • ofPercentage()
  • AsyncStream
    • ofPercentage()

Deprecations

  • infinite
    • booleans() (use random.booleans() instead).
    • booleansAsync() (use random.booleansAsync() instead).

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()