cancelable-promise
Advanced tools
Comparing version 0.0.8 to 1.1.0
@@ -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'); }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
23427
1