Functional programming, immutable collections and FP constructs for typescript and javascript
ISC License
Bot releases are hidden (Show)
Published by emmanueltouzery almost 2 years ago
Published by emmanueltouzery over 2 years ago
1.0.0 is fully compatible with 0.8.x, the API was not broken. The version change is more to signal that prelude-ts is stable software.
new APIs:
also:
Published by emmanueltouzery almost 6 years ago
Prelude-ts now requires typescript 3.1 or newer.
prelude.ts
to prelude-ts
(fixes #20). The old project prelude.ts
is still available but deprecated.Seq.removeAll
Vector.zip
, LinkedList.zip
, Stream.zip
on top of the instance method, which can take any number of input iterables (the instance method can only zip two iterables). We now depend on typescript 3.1+0.8.0 breaks API compatibility but mostly for Future
and if you used lifting. The rest stays the same except for really minor changes.
With 0.8.0, prelude.ts now requires Typescript 3.0.
list
for the backend of Vector in the past but had to revert it due to bugs in list
in 0.7.10).Vector
implementation, instead add a dependency to https://github.com/funkia/list which has a high-performance implementation. Especially append & prepend in loop should be much faster nowWith this release, prelude.ts now requires typescript 2.8.3 or newer (or plain javascript of course).
Option.try_
, Option.tryNullable
, Either.try_
thanks @davinkevin for the useful feedback & suggestionsOption.mapNullable
for a more handy workflow when working with code using null
to represent failureSeq.scanLeft
and Seq.scanRight
LinkedList.of()
and Stream.of()
(without parameters) would return a list with a single item, undefined
. That call was impossible in typescript (wouldn't compile) but it was possible in javascript. Now it returns an empty list as you would expect, while retaining the intended feature, that if there are parameters, the compiler knows we're dealing with a non-empty list (thanks to typescript overloads).