Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cancelable-promise

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cancelable-promise - npm Package Versions

13

3.1.3

Diff

Changelog

Source

3.1.3 (2020-08-31)

  • upgrade dev dependencies
  • add node v14 to nodejs workflows
sdavid
published 3.1.2 •

Changelog

Source

3.1.2 (2020-07-20)

  • upgrade dev dependencies
sdavid
published 3.1.1 •

Changelog

Source

3.1.1 (2020-05-01)

  • export CancelablePromiseType and CancelablePromiseConstructor types
  • upgrade dev dependencies
sdavid
published 3.1.0 •

Changelog

Source

3.1.0 (2020-04-28)

  • upgrade dev dependencies
  • add isCanceled method to cancelable promises
sdavid
published 3.0.0 •

Changelog

Source

3.0.0 (2020-04-07)

  • Complete rewrite of CancelablePromise. Now promises returned from Promise API such as then or catch can cancel the root promise and all promises created from this root promise:
// CancelablePromise v2
import CancelablePromise from 'cancelable-promise';

const promise = new CancelablePromise((resolve) => setTimeout(resolve, 1))
  .then(() => console.log('callback2 executed'))
  .then(() => console.log('callback3 executed'));
promise.cancel();
// logs:
// callback2 executed
// callback3 executed
// CancelablePromise v3
import CancelablePromise from 'cancelable-promise';

const promise = new CancelablePromise((resolve) => setTimeout(resolve, 1))
  .then(() => console.log('callback2 executed'))
  .then(() => console.log('callback3 executed'));
promise.cancel();
// no logs
  • a functionnal util has been added:
import { cancelable } from 'cancelable-promise';

cancelable(new Promise((resolve) => setTimeout(resolve, 1)));
  • UMD module, CancelablePromise can be loaded in browser
sdavid
published 2.6.0 •

sdavid
published 2.5.0 •

birdy
published 2.4.1 •

birdy
published 2.4.0 •

birdy
published 2.3.0 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc