1.0.0 • Published 7 years ago

promise-to-task v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

promise-to-task Build Status

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