Releases: TomerAberbach/lfi
Releases · TomerAberbach/lfi
v2.1.0
- 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
Breaking
- Require Node 16
- Deleted
collect
andfold
functions and types in favor of generalizingreduce
functions and types- Deleted:
collect
,collectAsync
, andcollectConcur
(usereduce
,reduceAsync
, andreduceConcur
instead)fold
,foldAsync
, andfoldConcur
(usereduce
,reduceAsync
, andreduceConcur
instead)counting
(usetoCount()
instead)folding
(pass a reducer object instead)grouping
(usetoGrouped(...)
instead)
- All prior collector variables (e.g.
toMap
,toSet
, etc.) are now reducer functions. Use likereduce(toMap())
!
- Deleted:
- 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
, andconsumeConcur
(iterates over an iterable; use to force it to compute if it's lazy)filterMap
,filterMapAsync
, andfilterMapConcur
(return null or a value from the callback; returns mapped iterable containing non-null values)mapReducer
andmapAsyncReducer
(mapping methods for new reducer concept)opaque
,opaqueAsync
, andopaqueConcur
(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
, andreduceConcur
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
What's Changed
- fix: add types to exports by @TomerAberbach in #4
- chore: upgrade dev deps by @TomerAberbach in #5
- fix: resolve after apply in find by @TomerAberbach in #6
Full Changelog: v1.0.5...v1.0.6
v1.0.5
What's Changed
- fix: infer usages with 'as const' properly by @TomerAberbach in #3
Full Changelog: v1.0.4...v1.0.5
v1.0.4
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.