aborted-promise

0.0.1 • Public • Published

CancelablePromise

ONLY JAVASRIPT ENGINES WITH INHERITANCE SUPPORT FOR NATIVE OBJECTS!

const CancelablePromise = require('aborted-promise');
 
const promise = CancelablePromise.all([
    new Promise((resolve, reject) => resolve())
]);
 
new CancelablePromise((resolve, reject) => resolve())
    .then(() => console.log('without cancel'));
 
promise
    .then(() => console.log('with cancel'))
    .cancel();

Say "Thank you, developer!"

Readme

Keywords

Package Sidebar

Install

npm i aborted-promise

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • defenderbass