make-cancellable-promise
Advanced tools
Comparing version 1.2.0 to 1.2.1
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function makeCancellablePromise(promise) { | ||
@@ -7,3 +7,4 @@ var isCancelled = false; | ||
promise | ||
.then(function (value) { return !isCancelled && resolve(value); })["catch"](function (error) { return !isCancelled && reject(error); }); | ||
.then(function (value) { return !isCancelled && resolve(value); }) | ||
.catch(function (error) { return !isCancelled && reject(error); }); | ||
}); | ||
@@ -14,5 +15,5 @@ return { | ||
isCancelled = true; | ||
} | ||
}, | ||
}; | ||
} | ||
exports["default"] = makeCancellablePromise; | ||
exports.default = makeCancellablePromise; |
@@ -5,3 +5,4 @@ export default function makeCancellablePromise(promise) { | ||
promise | ||
.then(function (value) { return !isCancelled && resolve(value); })["catch"](function (error) { return !isCancelled && reject(error); }); | ||
.then(function (value) { return !isCancelled && resolve(value); }) | ||
.catch(function (error) { return !isCancelled && reject(error); }); | ||
}); | ||
@@ -12,4 +13,4 @@ return { | ||
isCancelled = true; | ||
} | ||
}, | ||
}; | ||
} |
{ | ||
"name": "make-cancellable-promise", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Make any Promise cancellable.", | ||
@@ -8,3 +8,3 @@ "main": "dist/cjs/index.js", | ||
"source": "src/index.ts", | ||
"types": "src/index.ts", | ||
"types": "dist/cjs/index.d.ts", | ||
"sideEffects": false, | ||
@@ -11,0 +11,0 @@ "scripts": { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
8836
121
0