1.0.0 • Published 4 years ago

promise-listen-catch v1.0.0

Weekly downloads
18
License
MIT
Repository
github
Last release
4 years ago

Promise Listen Catch

A library to listen the promise chain, and decide to reject or not.

Installation

yarn add promise-listen-catch

Usage

const promise = new PromiseListenCatch((resolve, reject) => {
  setTimeout(() => {
    if (promise.canReject()) {
      reject('with catch');
    } else {
      resolve();
    }
  });
});

promise.then(() => {
  // ...
});
1.0.0

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago