p-cancelable
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -10,3 +10,3 @@ 'use strict'; | ||
class PCancelable extends Promise { | ||
class PCancelable { | ||
static fn(fn) { | ||
@@ -23,6 +23,2 @@ return function () { | ||
constructor(executor) { | ||
super(resolve => { | ||
resolve(); | ||
}); | ||
this._pending = true; | ||
@@ -80,3 +76,5 @@ this._canceled = false; | ||
Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); | ||
module.exports = PCancelable; | ||
module.exports.CancelError = CancelError; |
{ | ||
"name": "p-cancelable", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Create a promise that can be canceled", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
6547
64