Releases: OliverBrotchie/optionals
Releases · OliverBrotchie/optionals
Release list
Convenience helpers and improved spec compliance
This release brings some excellent feature suggestions from @aaronhuggins (#6) and brings this library's implementation closer to the Rust specification! This version will be released on NPM for greater availability of consumption.
Additions
Convenience helpers
from- Breaking Changes, diverges tofrom(synchronous) andfromAsync(asynchronous) methods to avoid the creation of unnecessary microtasks.Symbol.toStringTag- AddstoStringsupport which is useful in quickly and easily distinguishing resulting objects.Symbol.hasInstance- Addsinstanceofsupport toOk,Err,SomeandNone.
Spec compliance
Iterator- Provides iterator deserialization by yielding the internal value if the internal value is not anErrorNone.Result.expectErr- An extra method to expect anErrresult.ok- A method to convert fromResult<T, E>toOption<T>.okOr- A method to convert fromOption<T>toResult<T, E>.
May you have a blessed day! ❤️
Small doc change
Small Readme update
v2.0.1 Small Readme change
Class-based reimplementation
Optionals 2.0.0 reimplementation changes Result and Option into simple but expressive classes.
Hard Types
Splits the API into Soft and Hard types. Hard types allow for rust-like exhaustive matching! See READMEs for more details.
Moved from unknown to generic optionals
v1.0.3 Update mod.ts
Generics and full documentation
v1.0.2 Update README.md