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

make-cancellable-promise

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

make-cancellable-promise - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

9

dist/cjs/index.js
"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": {

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