Socket
Socket
Sign inDemoInstall

cancelable-promise

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cancelable-promise - npm Package Compare versions

Comparing version 0.0.8 to 1.1.0

6

CancelablePromise.js

@@ -25,6 +25,7 @@ export default class CancelablePromise {

this.then = this._promise.then.bind(this._promise);
this._onSuccess.forEach((cb) => {
cb(...args);
});
this.then = this._promise.then.bind(this._promise);
};

@@ -35,6 +36,7 @@

this.then = this._promise.then.bind(this._promise);
this._onError.forEach((cb) => {
cb(...args);
});
this.then = this._promise.then.bind(this._promise);
};

@@ -41,0 +43,0 @@ this._promise.then(success, error);

@@ -54,6 +54,7 @@ "use strict";

_this.then = _this._promise.then.bind(_this._promise);
_this._onSuccess.forEach(function (cb) {
cb.apply(undefined, args);
});
_this.then = _this._promise.then.bind(_this._promise);
};

@@ -68,6 +69,7 @@

_this.then = _this._promise.then.bind(_this._promise);
_this._onError.forEach(function (cb) {
cb.apply(undefined, args);
});
_this.then = _this._promise.then.bind(_this._promise);
};

@@ -74,0 +76,0 @@ this._promise.then(success, error);

{
"name": "cancelable-promise",
"version": "0.0.8",
"version": "1.1.0",
"description": "A simple cancelable promise",

@@ -5,0 +5,0 @@ "main": "dist/CancelablePromise.js",

@@ -14,3 +14,3 @@ # CancelablePromise

```
var CancelablePromis = require('cancelable-promise');
var CancelablePromise = require('cancelable-promise');
var myPromise = new CancelablePromise((resolve, reject) => { ... });

@@ -17,0 +17,0 @@ myPromise.then((response) => { console.log('not canceled'); });

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