Skip to content

Releases: TomerAberbach/lfi

v2.1.0

05 Apr 01:06
6c55d7e
Compare
Choose a tag to compare
  • Upgrade dev deps
  • Remove unnecessary call to asConcur/asAsync in some code (perf)
  • Allow concur iterables as inputs to asAsync

Full Changelog: v2.0.0...v2.1.0

v2.0.0

21 Aug 00:10
8c162f0
Compare
Choose a tag to compare

Breaking

  • Require Node 16
  • Deleted collect and fold functions and types in favor of generalizing reduce functions and types
    • Deleted:
      • collect, collectAsync, and collectConcur (use reduce, reduceAsync, and reduceConcur instead)
      • fold, foldAsync, and foldConcur (use reduce, reduceAsync, and reduceConcur instead)
      • counting (use toCount() instead)
      • folding (pass a reducer object instead)
      • grouping (use toGrouped(...) instead)
    • All prior collector variables (e.g. toMap, toSet, etc.) are now reducer functions. Use like reduce(toMap())!
  • Made function naming consistently imperative by renaming past-tense functions to imperative:
    • cached -> cache
    • chunked -> chunk
    • indexed -> index
    • windowed -> window
    • without -> exclude
  • Made various functions better mimic JavaScript array methods by looking for falsy/truthy values instead of strictly false/true

Minor

New functions:

  • consume, consumeAsync, and consumeConcur (iterates over an iterable; use to force it to compute if it's lazy)
  • filterMap, filterMapAsync, and filterMapConcur (return null or a value from the callback; returns mapped iterable containing non-null values)
  • mapReducer and mapAsyncReducer (mapping methods for new reducer concept)
  • opaque, opaqueAsync, and opaqueConcur (takes an iterable object and returns an object that's just an iterable; for example, if you pass an array you'll get just an iterable back)
  • sum, sumAsync, sumConcur
  • Reducers! Pass them to reduce, reduceAsync, and reduceConcur
    • toArray
    • toCount
    • toGrouped
    • toJoin
    • toMax
    • toMin
    • toMinMax
    • toMinMaxBy
    • toMinMaxByAsync
    • toMinMaxWith
    • toMinMaxWithAsync
    • toMultiple
    • toObject
    • toSet
    • toSum
    • toWeakMap
    • toWeakSet

Full Changelog: v1.0.6...v2.0.0

v1.0.6

18 Apr 03:22
e949393
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.0.5...v1.0.6

v1.0.5

23 Feb 03:46
0821ec6
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.0.4...v1.0.5

v1.0.4

21 Feb 21:23
208b61d
Compare
Choose a tag to compare

Full Changelog: v1.0.3...v1.0.4

Fixed an issue with collect(grouping(...)) types. Writing something like collect(grouping(toArray, toObject)) should infer more accurate types.