All changes to polyethylene
starting on 2.0.0 are registered in this file.
This file is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Reverted "Added
const
to return generic types ofmap
,mapKeys
,mapValues
,flatMap
andreduce
." from previous version. It was breaking in unpredicted ways that were way more impactful that I thought.
- Fixed documentation for
mapKeys
andmapValues
- Added
const
to return generic types ofmap
,mapKeys
,mapValues
,flatMap
andreduce
. This should reduce the instances whereas const
is needed before calling method that restrict thethis
type to pairs of elements, such astoMap
ortoObject
. This might break the types of some existing code if they were relying in generalized inference of literals or arrays.
- Added
duplicate
method to both iterables
- Improved types of
toObject
andtoMap
methods - Improved performance of
PolySyncIterable#map
andPolySyncIterable#filter
- Added
mapKeys
method to both iterables - Added
mapValues
method to both iterables
- Added an
options
argument toPolyAsyncIterable#complete
- Added an
options
argument toPolyAsyncIterable#join
- Added a type predicate version of
takeWhile
to both iterables
- Added
findLast
leaf method to both iterables - Added
findIndex
leaf method to both iterables - Added
findLastIndex
leaf method to both iterables - Added
concurrency
andbufferSize
options to many ofPolyAsyncIterable
methods - Added
count
to both iterables
- Fixed
chunkWhile
not working correctly - Fixed async iterable tests not actually covering the case of async functions
- Fixed a problem with type definitions reference
- Further reduced the size of the distributed package by excluding tests and GitHub stuff
- Added a CommonJS version of the package
- Added a
.from
method with the combined functionality of.syncFrom
and.asyncFrom
- Reduced the size of the distributed package by excluding docs
- Port codebase to TypeScript, and add type definition files
- Move to ESModules and remove support for CommonJS
- Split
Poly.from
intoPoly.syncFrom
andPoly.asyncFrom
- Split
Poly.iterate
intoPoly.syncIterate
andPoly.asyncIterate
- Remove
options
object altogether (functionality replaced withprefetch
method) - Remove default arguments for most methods that accept a function as a parameter (
unique
andsort
preserve their defaults) - Rename
group
andgroupWhile
tochunk
andchunkWhile
respectively - Rename
drain
tocomplete
- Add
Poly.empty<T>
method to create (typed) empty iterables - Add
prefetch
method to async iterables - Add
filterNotNullish
as a shorthand for filtering outnull
andundefined
from an iterable - Add
groupBy
to both sync and async iterables - Add
toMap
leaf method to both sync and async iterables - Add
toPartitionArray
leaf method to both sync and async iterables