Skip to content

v2.0.0

Latest
Compare
Choose a tag to compare
@YannickDot YannickDot released this 10 May 11:24
· 37 commits to master since this release

Breaking change in 2.0.0 !

I decided to make Taskorama compatible with other fantasyland-friendly πŸ¦„ 🌈 Task libraries by embracing the same convention in arguments order :

const t = Task(function(resolve, reject) {})

becomes

// Arguments are flipped now - the 'reject' callback is the first argument
const t = Task(function(reject, resolve) {}) 

If you want to keep using the old argument order (maybe you're used to manipulate Promises), you can use the Task.flippedArgs constructor :

// This works perfectly ! 
const t = Task.flippedArgs(function(resolve, reject) {})

πŸ˜‰