Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Releases: proc7ts/a-iterable

Release 2.0.0

05 Dec 07:40
Compare
Choose a tag to compare

Release 1.2.0

04 Nov 10:46
e44a473
Compare
Choose a tag to compare

New Features

  1. New plain iterable construction utilities:
  • overArray() to iterate over array elements
  • overEntries() to iterate over object key/value entries
  • overKeys() to iterate ober object keys
  • overNone() to create an empty iterable
  1. New plain iterable manipulation utilities corresponding to the ones in AIterable:
  • filterIt()
  • flatMapIt()
  • 'mapIt()`
  1. New plain iterable terminators:
  • itsEach()
  • itsEvery()
  • itsReduce()
  1. New plain iterable utilities:
  • itsIterator() - a shortcut to start the iteration to use instead of iterable[Symbol.iterator]()
  • makeIt() to create arbitrary (optionally revertible) iterable
  1. AIterable mixin:
  • toAIterable() - a function that extends a class implementing Iterable with AIterable API

Improvements

  1. reverseArray() accepts arbitrary array-like structures, not just arrays.
  2. itsLast() accepts arbitrary array-like structures, not just arrays.

Incompatible Changes

  1. reverseIterator() is renamed to reverseIt() to conform to common naming conventions.
  2. reverseIt() and reverseArray() return non-revertible iterables now
  3. AIterable.of() returns an ArrayLikeIterable instance.
    That's because an Array.flatMap() expects its callback function to return an array, while AIterable expects just Iterable

Release 1.1.1

02 Nov 11:30
8de6c65
Compare
Choose a tag to compare
  • Ease the RevertibleIterable API. The revert() method returns Iterable instead of RevertibleIterable now
  • Implement generic reverseIterable() utility function.
  • Implement reverse() method of iterables constructed with AIterable.from() using reverseIterable() function.

Release 1.1.0

02 Nov 10:47
c3d08ff
Compare
Choose a tag to compare

Introduce revertible iterables support:

  • RevertibleIterable interface (already implemented by arrays)
  • AIterable.reverse() method
  • Special arrays treatment
  • Additional utility methods:
    • itsLast() to find the last element of iterable
    • reverseArray() to construct a reverted iterable of array elements

Release 1.0.1

01 Nov 13:56
7064bb7
Compare
Choose a tag to compare

Implement every() and none() methods

Release 1.0.0

01 Nov 11:23
Compare
Choose a tag to compare

Initial release