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

cancelable-promise

Package Overview
Dependencies
Maintainers
3
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 2.5.0 to 2.6.0

4

CancelablePromise.js

@@ -42,3 +42,3 @@ const handleCallback = (resolve, reject, callback, r) => {

this._promise.then(
r => {
(r) => {
if (this._canceled) {

@@ -53,3 +53,3 @@ p.cancel();

},
r => {
(r) => {
if (this._canceled) {

@@ -56,0 +56,0 @@ p.cancel();

@@ -22,5 +22,3 @@ "use strict";

var CancelablePromise =
/*#__PURE__*/
function () {
var CancelablePromise = /*#__PURE__*/function () {
_createClass(CancelablePromise, null, [{

@@ -27,0 +25,0 @@ key: "all",

{
"name": "cancelable-promise",
"version": "2.5.0",
"version": "2.6.0",
"description": "A simple cancelable promise",

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

"scripts": {
"test": "mocha --opts mocha.opts",
"test": "eslint . && mocha --opts mocha.opts",
"build": "babel -d dist/ CancelablePromise.js",
"prepublish": "npm run build"
"prepublish": "npm run build",
"prettier": "prettier --write '*.{js,md}'"
},

@@ -30,10 +31,11 @@ "repository": {

"devDependencies": {
"@babel/cli": "~7.5.0",
"@babel/core": "~7.5.4",
"@babel/preset-env": "~7.5.4",
"@babel/register": "~7.4.4",
"@babel/cli": "~7.8.4",
"@babel/core": "~7.9.0",
"@babel/preset-env": "~7.9.0",
"@babel/register": "~7.9.0",
"chai": "~4.2.0",
"mocha": "~6.1.4",
"prettier": "~1.18.2"
"eslint": "~6.8.0",
"mocha": "~7.1.1",
"prettier": "~2.0.4"
}
}
# CancelablePromise
A simple Cancelable Promise for browser

@@ -13,3 +14,5 @@

## Usage
CancelablePromise acts like a ES6 Promise: you can use `Promise.all`, `Promise.race` with your CancelablePromise for example. The only difference is you'll have a `cancel` method on your promise to cancel future execution of `then` or `catch` functions. CancelablePromise will also cancel all callbacks attached to new promises returned by `then`/`catch`.
```

@@ -24,2 +27,3 @@ import CancelablePromise from 'cancelable-promise';

## Test
You can run tests with `npm run test`
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