Skip to content

v2.0.0-beta1

Pre-release
Pre-release
Compare
Choose a tag to compare
@robotlolita robotlolita released this 25 Jun 16:48
· 171 commits to master since this release

Install it through npm or download the attached zip:

$ npm install --save [email protected]

Thanks to the contributions of @rpearce, @boris-marinov, @justin-calleja, @sotojuan, @degroote22, @RossJHagan, and @syaiful6 in this and previous releases of the 2.0 branch. A final release will happen as soon as some browser problems are fixed :)

Documentation

  • Documentation for Data.Future was added.
  • Fixed some of the Data.Task documentation.

New features

  • nodebackToTask (and Task.fromNodeback) allows converting callback-based functions in Node-style to Tasks automatically
    (PR #116 by @rpearce)
  • futureToPromise and promiseToFuture allow converting between promises and futures. The conversion isn't strictly loss-less due to the difference in semantics
    (PR #119, details in #98)
  • promisedToTask (and Task.fromPromised) allows converting functions that return promises to functions that return tasks
    (PR #120, details in #97)

BREAKING CHANGES

  • (f43441b)
    Future#mapRejection has been renamed to Future#mapRejected for consistency. To fix just replace any
    calls of mapRejection on Futures to mapRejected:

    // Before
    Future.rejected(1).mapRejection(x => x + 1);
    
    // Now
    Future.rejected(1).mapRejected(x => x + 1);