@makejsgreatagain/promise-chain
v1.1.0
Published
Chain your promises to make code compact.
Downloads
3
Maintainers
Readme
promise-chain
Chain your promise returns
Promise Chain
A small library that chains your multiple promise to 1
Installation
npm i @makejsgreatagain/promise-chain
Usage
var pChain = new PromiseChain(initialPromise);
pChain.then(firstAsyncMethod)
.catch(firstAsyncExceptionHandler)
.then(secondAsyncMethod)
.catch(secondAsyncExceptionHandler);
Note that each Async method should return new promise.
Tests
npm test
Contributing
Siddhesh Kulkarni