promise-to-task

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i promise-to-task

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • hemanth