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

promise

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promise - npm Package Compare versions

Comparing version 7.0.2 to 7.0.3

44

domains/core.js

@@ -61,9 +61,9 @@ 'use strict';

}
this._67 = 0;
this._7 = null;
this._20 = [];
this._41 = 0;
this._86 = null;
this._17 = [];
if (fn === noop) return;
doResolve(fn, this);
}
Promise._83 = noop;
Promise._1 = noop;

@@ -87,20 +87,20 @@ Promise.prototype.then = function(onFulfilled, onRejected) {

function handle(self, deferred) {
while (self._67 === 3) {
self = self._7;
while (self._41 === 3) {
self = self._86;
}
if (self._67 === 0) {
self._20.push(deferred);
if (self._41 === 0) {
self._17.push(deferred);
return;
}
asap(function() {
var cb = self._67 === 1 ? deferred.onFulfilled : deferred.onRejected;
var cb = self._41 === 1 ? deferred.onFulfilled : deferred.onRejected;
if (cb === null) {
if (self._67 === 1) {
resolve(deferred.promise, self._7);
if (self._41 === 1) {
resolve(deferred.promise, self._86);
} else {
reject(deferred.promise, self._7);
reject(deferred.promise, self._86);
}
return;
}
var ret = tryCallOne(cb, self._7);
var ret = tryCallOne(cb, self._86);
if (ret === IS_ERROR) {

@@ -133,4 +133,4 @@ reject(deferred.promise, LAST_ERROR);

) {
self._67 = 3;
self._7 = newValue;
self._41 = 3;
self._86 = newValue;
finale(self);

@@ -143,4 +143,4 @@ return;

}
self._67 = 1;
self._7 = newValue;
self._41 = 1;
self._86 = newValue;
finale(self);

@@ -150,11 +150,11 @@ }

function reject(self, newValue) {
self._67 = 2;
self._7 = newValue;
self._41 = 2;
self._86 = newValue;
finale(self);
}
function finale(self) {
for (var i = 0; i < self._20.length; i++) {
handle(self, self._20[i]);
for (var i = 0; i < self._17.length; i++) {
handle(self, self._17[i]);
}
self._20 = null;
self._17 = null;
}

@@ -161,0 +161,0 @@

@@ -20,5 +20,5 @@ 'use strict';

function valuePromise(value) {
var p = new Promise(Promise._83);
p._67 = 1;
p._7 = value;
var p = new Promise(Promise._1);
p._41 = 1;
p._86 = value;
return p;

@@ -60,7 +60,7 @@ }

if (val instanceof Promise && val.then === Promise.prototype.then) {
while (val._67 === 3) {
val = val._7;
while (val._41 === 3) {
val = val._86;
}
if (val._67 === 1) return res(i, val._7);
if (val._67 === 2) reject(val._7);
if (val._41 === 1) return res(i, val._86);
if (val._41 === 2) reject(val._86);
val.then(function (val) {

@@ -67,0 +67,0 @@ res(i, val);

@@ -61,9 +61,9 @@ 'use strict';

}
this._67 = 0;
this._7 = null;
this._20 = [];
this._41 = 0;
this._86 = null;
this._17 = [];
if (fn === noop) return;
doResolve(fn, this);
}
Promise._83 = noop;
Promise._1 = noop;

@@ -87,20 +87,20 @@ Promise.prototype.then = function(onFulfilled, onRejected) {

function handle(self, deferred) {
while (self._67 === 3) {
self = self._7;
while (self._41 === 3) {
self = self._86;
}
if (self._67 === 0) {
self._20.push(deferred);
if (self._41 === 0) {
self._17.push(deferred);
return;
}
asap(function() {
var cb = self._67 === 1 ? deferred.onFulfilled : deferred.onRejected;
var cb = self._41 === 1 ? deferred.onFulfilled : deferred.onRejected;
if (cb === null) {
if (self._67 === 1) {
resolve(deferred.promise, self._7);
if (self._41 === 1) {
resolve(deferred.promise, self._86);
} else {
reject(deferred.promise, self._7);
reject(deferred.promise, self._86);
}
return;
}
var ret = tryCallOne(cb, self._7);
var ret = tryCallOne(cb, self._86);
if (ret === IS_ERROR) {

@@ -133,4 +133,4 @@ reject(deferred.promise, LAST_ERROR);

) {
self._67 = 3;
self._7 = newValue;
self._41 = 3;
self._86 = newValue;
finale(self);

@@ -143,4 +143,4 @@ return;

}
self._67 = 1;
self._7 = newValue;
self._41 = 1;
self._86 = newValue;
finale(self);

@@ -150,11 +150,11 @@ }

function reject(self, newValue) {
self._67 = 2;
self._7 = newValue;
self._41 = 2;
self._86 = newValue;
finale(self);
}
function finale(self) {
for (var i = 0; i < self._20.length; i++) {
handle(self, self._20[i]);
for (var i = 0; i < self._17.length; i++) {
handle(self, self._17[i]);
}
self._20 = null;
self._17 = null;
}

@@ -161,0 +161,0 @@

@@ -20,5 +20,5 @@ 'use strict';

function valuePromise(value) {
var p = new Promise(Promise._83);
p._67 = 1;
p._7 = value;
var p = new Promise(Promise._1);
p._41 = 1;
p._86 = value;
return p;

@@ -60,7 +60,7 @@ }

if (val instanceof Promise && val.then === Promise.prototype.then) {
while (val._67 === 3) {
val = val._7;
while (val._41 === 3) {
val = val._86;
}
if (val._67 === 1) return res(i, val._7);
if (val._67 === 2) reject(val._7);
if (val._41 === 1) return res(i, val._86);
if (val._41 === 2) reject(val._86);
val.then(function (val) {

@@ -67,0 +67,0 @@ res(i, val);

{
"name": "promise",
"version": "7.0.2",
"version": "7.0.3",
"description": "Bare bones Promises/A+ implementation",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -61,9 +61,9 @@ 'use strict';

}
this._67 = 0;
this._7 = null;
this._20 = [];
this._41 = 0;
this._86 = null;
this._17 = [];
if (fn === noop) return;
doResolve(fn, this);
}
Promise._83 = noop;
Promise._1 = noop;

@@ -87,20 +87,20 @@ Promise.prototype.then = function(onFulfilled, onRejected) {

function handle(self, deferred) {
while (self._67 === 3) {
self = self._7;
while (self._41 === 3) {
self = self._86;
}
if (self._67 === 0) {
self._20.push(deferred);
if (self._41 === 0) {
self._17.push(deferred);
return;
}
setImmediate(function() {
var cb = self._67 === 1 ? deferred.onFulfilled : deferred.onRejected;
var cb = self._41 === 1 ? deferred.onFulfilled : deferred.onRejected;
if (cb === null) {
if (self._67 === 1) {
resolve(deferred.promise, self._7);
if (self._41 === 1) {
resolve(deferred.promise, self._86);
} else {
reject(deferred.promise, self._7);
reject(deferred.promise, self._86);
}
return;
}
var ret = tryCallOne(cb, self._7);
var ret = tryCallOne(cb, self._86);
if (ret === IS_ERROR) {

@@ -133,4 +133,4 @@ reject(deferred.promise, LAST_ERROR);

) {
self._67 = 3;
self._7 = newValue;
self._41 = 3;
self._86 = newValue;
finale(self);

@@ -143,4 +143,4 @@ return;

}
self._67 = 1;
self._7 = newValue;
self._41 = 1;
self._86 = newValue;
finale(self);

@@ -150,11 +150,11 @@ }

function reject(self, newValue) {
self._67 = 2;
self._7 = newValue;
self._41 = 2;
self._86 = newValue;
finale(self);
}
function finale(self) {
for (var i = 0; i < self._20.length; i++) {
handle(self, self._20[i]);
for (var i = 0; i < self._17.length; i++) {
handle(self, self._17[i]);
}
self._20 = null;
self._17 = null;
}

@@ -161,0 +161,0 @@

@@ -20,5 +20,5 @@ 'use strict';

function valuePromise(value) {
var p = new Promise(Promise._83);
p._67 = 1;
p._7 = value;
var p = new Promise(Promise._1);
p._41 = 1;
p._86 = value;
return p;

@@ -60,7 +60,7 @@ }

if (val instanceof Promise && val.then === Promise.prototype.then) {
while (val._67 === 3) {
val = val._7;
while (val._41 === 3) {
val = val._86;
}
if (val._67 === 1) return res(i, val._7);
if (val._67 === 2) reject(val._7);
if (val._41 === 1) return res(i, val._86);
if (val._41 === 2) reject(val._86);
val.then(function (val) {

@@ -67,0 +67,0 @@ res(i, val);

Sorry, the diff of this file is not supported yet

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