emmanueltouzery / prelude-ts

Functional programming, immutable collections and FP constructs for typescript and javascript
ISC License
377 stars 21 forks source link

Option.ofNullable(0) returns None #19

Closed bwbuchanan closed 6 years ago

bwbuchanan commented 6 years ago

Option.ofNullable uses Javascript "truthiness" as its predicate, instead of comparing against null.

The result of this is that Option.ofNullable(0) returns None, instead of the expected value Some<0>

emmanueltouzery commented 6 years ago

sorry about that one... 0.8.1 will be on npm in a few minutes with the fix...

emmanueltouzery commented 6 years ago

thanks for the report!