1.0.0 • Published 7 years ago
promise-to-task v1.0.0
promise-to-task
Tiny module to convert a Promise into Task.
Install
$ npm install --save promise-to-task
Usage
const promiseToTask = require('promise-to-task');
const promise = new Promise((res, rej) => {}))
promiseToTask(promise)
.rejectedMap(e => 'oops')
.fork(console.warn, console.log);
API
promiseToTask(input)
input
Type: Promise
The Promise that you need to convert to a Task.
License
MIT © Hemanth.HM
1.0.0
7 years ago