1.0.0 • Published 5 years ago

promise-listen-catch v1.0.0

Weekly downloads
18
License
MIT
Repository
github
Last release
5 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

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago