Skip to content

1.4.0 - Results

Compare
Choose a tag to compare
@hazae41 hazae41 released this 08 Mar 08:32
· 608 commits to master since this release

BREAKING

  • Renamed Result to ResultInit

Non breaking

  • New Result type which follows wrapper.unwrap() pattern
  • Result.from(init) converts a ResultInit into a Result
  • Result.map(callback) maps the result data into another type
  • Result.unwrap() returns the data or throws the error
  • Result.rewrap(wrapper) transforms a wrapper (an object with unwrap()) into a Result
  • Result.wrap(callback) and Result.wrapSync(callback) can wrap a throwable callback into a Result

Fixes

  • Fixed a bug with normalization and storage