Skip to content

Releases: jajaperson/iterable-utilities

NPM, flatten, fuse, and fromResults

30 Jul 07:31
d82fe77
Compare
Choose a tag to compare

Added

  • NPM support 🎉
  • Transformers
    • iter.flat() (like Array.prototype.flat)
    • iter.completeFlat() for flattening an iterable completely.
    • iter.fuse() for ignoring values after and including the return.
  • Generators
    • iter.create.fromResults() for creating iterators directly from results

Range, arithmetic reducers, and effectors

03 Feb 15:56
81d42b5
Compare
Choose a tag to compare

Added

  • Effectors
    • iter.forEach() (like Array.prototype.forEach)
    • iter.lazyObserver() for observing each yielded value lazily.
  • Generators
    • iter.create.range() for creating an iterable over a range of numbers.
  • Reducers
    • iter.sum() for getting the sum of an iterable.
    • iter.product() for getting the product of an iterable.
    • iter.norm() for getting the vector norm of an iterable.

Improve naming conventions

03 Feb 04:17
5da129f
Compare
Choose a tag to compare

Added

  • Several types for iter functions.
    • IterFunction
    • UniaryIterFunction
    • CurriedIterFunction
    • UniaryIterTransformer
  • Documentation on chaining/composition.

Changed

  • All documentation which previously referred to the functions of this library
    as methods now says function.

FP version

01 Feb 06:30
b1cad04
Compare
Choose a tag to compare

Added

  • An IterableCircular type for iterables using generator functions.
  • A alternative module with a sensible level of currying, fp.ts. This is also
    exported as curried from the main mod.ts.

Changed

  • Everything which used to return an Iterable now returns the
    IterableCircular type. This doesn't break anything because these types are
    compatible.

Permanent iterables and better docs

30 Jan 07:18
e365911
Compare
Choose a tag to compare

Added

  • Export LICENSE from version.ts and mod.ts
  • Transformers
    • iter.remember() so that an iterable can be iterated over multiple times and
      be guaranteed to yield the same results.
  • Examples to documentation

Reusable iterables

28 Jan 09:35
2f5c919
Compare
Choose a tag to compare

Added

Changed

  • Everything which used to return the IterableIterator type now returns the
    Iterable type. This also means that returned iterables are not use-once.
  • Iterables are no longer stripped before being passed to callbacks.

First stable release 🎉

27 Jan 09:37
408c312
Compare
Choose a tag to compare

Maybe it was too soon.

Added

  • Reducers
    • iter.find() (like Array.prototype.find)
    • iter.findIndex() (like Array.prototype.findIndex)
    • iter.includes() (like Array.prototype.includes)
  • Transformers
    • iter.filter() (like Array.prototype.filter)
    • iter.until() to cut off an iterable when a predicate returns true
    • iter.indexedPairs (like Array.prototype.entries)

Add reducers

21 Jan 17:20
83e802f
Compare
Choose a tag to compare

Added

  • More unit tests.
  • Better documentation via TSDoc
  • Reducers
    • iter.reduce() (like Array.prototype.reduce)
    • iter.some() (like Array.prototype.some)
    • iter.every() (like Array.prototype.every)
  • Generators
    • iter.create.increments() to create an endless incremementing interator.

Changed

  • Clear separation of internal API.
  • Generators
    • Old iter.create.from() is now iter.create.endlessFrom().
      iter.create.from() now creates an iterator from a function returning
      iterator result objects.

Fix bug in `iter.pair()`

20 Jan 16:27
5e0d704
Compare
Choose a tag to compare

Added

  • Unit tests

Changed

  • iter.pair() fixed so it doesn't just give the same value.

7 new utilities

20 Jan 15:01
2b4a52a
Compare
Choose a tag to compare

Added

  • Generators
    • iter.create.from() for creating iterators from functions.
    • iter.create.constant() for creating an endless iterable of the same value.
    • iter.create.randomNumbers() for creating an endless iterable of
      pseudorandom numbers.
  • Transformers
    • iter.map() (like Array.prototype.map)
    • iter.take() for taking the first n items of an iterable.
  • Combinators
    • iter.pair() for zipping two iterables.
    • iter.concat (like Array.prototype.concat)