New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

p-promise

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-promise - npm Package Compare versions

Comparing version 0.3.7 to 0.3.8

182

p.js

@@ -29,7 +29,26 @@ /*!

function getTrace() {
var stack = new Error().stack;
if ( !stack ) {
return null;
}
var stacks = [ filterStackString( stack, 1 ) ];
if ( currentTrace ) {
stacks = stacks.concat( currentTrace );
if ( stacks.length === 128 ) {
stacks.pop();
}
}
return stacks;
}
function getFileNameAndLineNumber( stackLine ) {
var m =
/at .+ \((.+):(\d+):(?:\d+)\)$/.exec( stackLine ) ||
/at .+ \(([\s\S]+):(\d+):(?:\d+)\)$/.exec( stackLine ) ||
/at ([^ ]+):(\d+):(?:\d+)$/.exec( stackLine ) ||
/.*@(.+):(\d+)$/.exec( stackLine );
/@([\s\S]+):(\d+):(?:\d+)$/.exec( stackLine );

@@ -92,16 +111,5 @@ return m ? { fileName: m[1], lineNumber: Number(m[2]) } : null;

) {
var stacks = [ filterStackString( error.stack, 0 ) ];
var trace = currentTrace;
var limit = 512;
while ( trace && --limit ) {
var stack = trace.stack && filterStackString( trace.stack, 2 );
if ( stack ) {
stacks.push( stack );
}
trace = trace.parent;
}
var longStack = stacks.join(STACK_JUMP_SEPARATOR);
error.stack = longStack;
error.stack = [ filterStackString( error.stack, 0 ) ]
.concat( currentTrace || [] )
.join(STACK_JUMP_SEPARATOR);
}

@@ -165,3 +173,3 @@ }

while ( head !== tail ) {
head = head.next;
var h = head = head.next;

@@ -174,16 +182,16 @@ if ( nFreeTaskNodes >= 1024 ) {

currentTrace = head.trace;
currentTrace = h.trace;
if ( head.domain ) {
runInDomain( head.domain, head.task, head.a, head.b );
head.domain = null;
if ( h.domain ) {
runInDomain( h.domain, h.task, h.a, h.b );
h.domain = null;
} else {
(1,head.task)( head.a, head.b );
(1,h.task)( h.a, h.b );
}
head.task = null;
head.a = null;
head.b = null;
head.trace = null;
h.task = null;
h.a = null;
h.b = null;
h.trace = null;
}

@@ -214,10 +222,7 @@

function queueTask( task, a, b ) {
var domain = isNodeJS ? process.domain : null;
var trace = P.longStackSupport ? {
parent: currentTrace,
stack: new Error().stack
} : null;
queueTask_( task, a, b, domain, trace );
queueTask_(
task, a, b,
isNodeJS ? process.domain : null,
P.longStackSupport ? getTrace() : null
);
}

@@ -329,2 +334,7 @@

var OP_CALL = -1;
var OP_THEN = -2;
var OP_PROPAGATE = -3;
var OP_MULTIPLE = -4;
function ReportIfRejected( p ) {

@@ -367,3 +377,3 @@ if ( p._state === REJECTED ) {

if ( p._pending ) {
HandlePending( p, p._pending );
HandlePending( p, p._op, p._pending );
p._pending = null;

@@ -390,3 +400,3 @@ }

if ( p._pending ) {
HandlePending( p, p._pending );
HandlePending( p, p._op, p._pending );
p._pending = null;

@@ -406,3 +416,3 @@ }

if ( p._pending ) {
HandlePending( p, p._pending );
HandlePending( p, p._op, p._pending );
p._pending = null;

@@ -425,3 +435,3 @@ }

} else {
OnSettled( x, p );
OnSettled( x, OP_PROPAGATE, p );
}

@@ -468,52 +478,52 @@

function HandlePending( p, pending ) {
if ( typeof pending === "function" ) {
pending( p, p._index );
function HandlePending( p, op, pending ) {
switch ( op ) {
case OP_CALL:
pending( p );
break;
} else if ( pending instanceof Promise ) {
queueTask_(
Then, p, pending,
p._domain || pending._domain,
pending._trace
);
case OP_THEN:
queueTask_(
Then, p, pending,
p._domain || pending._domain,
pending._trace
);
break;
} else {
for ( var i = 0, l = pending.length; i < l; ++i ) {
HandlePending( p, pending[i] );
}
case OP_PROPAGATE:
queueTask_(
Propagate, p, pending,
null,
null
);
break;
case OP_MULTIPLE:
for ( var i = 0, l = pending.length; i < l; i += 2 ) {
HandlePending( p, pending[i], pending[i + 1] );
}
break;
default:
pending( p, op );
}
}
function OnSettled( p, pending ) {
function OnSettled( p, op, pending ) {
if ( p._state ) {
HandlePending( p, pending );
HandlePending( p, op, pending );
} else if ( !p._pending ) {
p._pending = pending;
p._op = op;
} else if ( p._pending instanceof Array ) {
p._pending.push( pending );
} else if ( p._op === OP_MULTIPLE ) {
p._pending.push( op, pending );
} else {
p._pending = [ p._pending, pending ];
p._pending = [ p._op, p._pending, op, pending ];
p._op = OP_MULTIPLE;
}
}
function OnSettledAt( p, index, onSettled ) {
if ( p._state ) {
onSettled( p, index );
} else if ( !p._pending ) {
p._pending = onSettled;
p._index = index;
} else {
OnSettled(index === p._index ? onSettled :
function( p, i ) {
onSettled( p, index );
}
);
}
}
function Then( parent, p ) {

@@ -524,2 +534,3 @@ var cb = parent._state === FULFILLED ? p._cb : p._eb;

p._domain = null;
p._trace = null;

@@ -588,3 +599,3 @@ if ( cb === null ) {

this._eb = null;
this._index = 0;
this._op = 0;
this._pending = null;

@@ -597,12 +608,9 @@ this._trace = null;

promise._cb = typeof onFulfilled === "function" ? onFulfilled : null;
promise._eb = typeof onRejected === "function" ? onRejected : null;
if ( P.longStackSupport ) {
promise._trace = {
parent: currentTrace,
stack: new Error().stack
};
promise._trace = getTrace();
}
promise._cb = typeof onFulfilled === "function" ? onFulfilled : null;
promise._eb = typeof onRejected === "function" ? onRejected : null;
if ( isNodeJS ) {

@@ -612,3 +620,3 @@ promise._domain = process.domain;

OnSettled( this, promise );
OnSettled( this, OP_THEN, promise );

@@ -625,3 +633,3 @@ return promise;

OnSettled( p, ReportIfRejected );
OnSettled( p, OP_CALL, ReportIfRejected );
};

@@ -646,3 +654,3 @@

} else {
var trace = currentTrace;
var trace = P.longStackSupport ? getTrace() : null;
var timeoutId = setTimeout(function() {

@@ -653,3 +661,3 @@ currentTrace = trace;

OnSettled( this, function( p ) {
OnSettled( this, OP_CALL, function( p ) {
clearTimeout( timeoutId );

@@ -734,3 +742,3 @@ Propagate( p, promise );

++waiting;
OnSettledAt( p, i, onSettled );
OnSettled( p, i, onSettled );
}

@@ -783,3 +791,3 @@ }

++waiting;
OnSettledAt( p, i, onSettled );
OnSettled( p, i, onSettled );
}

@@ -786,0 +794,0 @@ }

@@ -1,1 +0,1 @@

(function(e){if(typeof module!=="undefined"&&module&&module.exports){module.exports=e()}else if(typeof define==="function"&&define.amd){define(e)}else{P=e()}})(function(){"use strict";var e=i(),n,t=null;function r(e){var n=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(e)||/at ([^ ]+):(\d+):(?:\d+)$/.exec(e)||/.*@(.+):(\d+)$/.exec(e);return n?{fileName:n[1],lineNumber:Number(n[2])}:null}function i(){var e=(new Error).stack;if(!e){return 0}var t=e.split("\n");var i=t[0].indexOf("@")>0?t[1]:t[2];var a=r(i);if(!a){return 0}n=a.fileName;return a.lineNumber}function a(e,n){var t=e.split("\n");var r=[];for(var i=n|0,a=t.length;i<a;++i){var l=t[i];if(l&&!o(l)&&!u(l)){r.push(l)}}return r.join("\n")}function o(e){return e.indexOf("(module.js:")!==-1||e.indexOf("(node.js:")!==-1}function u(t){var i=r(t);return!!i&&i.fileName===n&&i.lineNumber>=e&&i.lineNumber<=ln}var l="\nFrom previous event:\n";function f(e){if(e instanceof Error&&e.stack&&e.stack.indexOf(l)===-1){var n=[a(e.stack,0)];var r=t;var i=512;while(r&&--i){var o=r.stack&&a(r.stack,2);if(o){n.push(o)}r=r.parent}var u=n.join(l);e.stack=u}}var s=T(typeof process)&&process!=null&&{}.toString.call(process)==="[object process]",c=typeof setImmediate==="function",p=T(typeof MutationObserver)&&MutationObserver||T(typeof WebKitMutationObserver)&&WebKitMutationObserver,d=new j,v=d,_=false,h=0,m=s?M:p?$(N):K(N),y=[],b=K(E),g,w,x=T.call,k=T.apply;v.next=d;function j(){this.task=null;this.a=null;this.b=null;this.domain=null;this.trace=null;this.next=null}function T(e){return e==="object"||e==="function"}function E(){if(y.length){throw y.shift()}}function N(){while(d!==v){d=d.next;if(h>=1024){v.next=v.next.next}else{++h}t=d.trace;if(d.domain){S(d.domain,d.task,d.a,d.b);d.domain=null}else{(1,d.task)(d.a,d.b)}d.task=null;d.a=null;d.b=null;d.trace=null}_=false;t=null}function O(){d.task=null;d.a=null;d.b=null;d.domain=null;d.trace=null;m()}function S(e,n,t,r){if(e._disposed){return}e.enter();n(t,r);e.exit()}function A(e,n,r){var i=s?process.domain:null;var a=B.longStackSupport?{parent:t,stack:(new Error).stack}:null;I(e,n,r,i,a)}function I(e,n,t,r,i){var a=v.next;if(a===d){a=new j;v.next=a;a.next=d}else{--h}v=a;a.task=e;a.a=n;a.b=t;a.domain=r;a.trace=i;if(!_){_=true;m()}}function M(){var e=process.domain;if(e){if(!w)w=(1,require)("domain");w.active=process.domain=null}if(_&&c){setImmediate(N)}else{process.nextTick(N)}if(e){w.active=process.domain=e}}function $(e){var n=1;var t=document.createTextNode("");var r=new p(e);r.observe(t,{characterData:true});return function(){n=-n;t.data=n}}function K(e){return function(){var n=setTimeout(r,0);var t=setInterval(r,50);function r(){clearTimeout(n);clearInterval(t);e()}}}if(s){g=function(e){O();throw e}}else{g=function(e){y.push(e);b()}}function W(e,n){try{e.call()}catch(t){n(t)}}function q(e){A(W,e,g)}var D=0;var F=1;var P=2;function Y(e){if(e._state===P){I(z,e._value,g,e._domain,null)}}function z(e,n){if(B.onerror){try{(1,B.onerror)(e)}catch(t){n(t)}}else{n(e)}}function B(e){return e instanceof tn?e:J(new tn,e,false)}B.longStackSupport=false;function C(e,n){if(e._state){return}e._state=F;e._value=n;if(e._pending){Q(e,e._pending);e._pending=null}}function G(e,n){if(e._state){return}if(t){f(n)}e._state=P;e._value=n;if(s){e._domain=process.domain}if(e._pending){Q(e,e._pending);e._pending=null}}function H(e,n){if(n._state){return}n._state=e._state;n._value=e._value;n._domain=e._domain;if(n._pending){Q(n,n._pending);n._pending=null}}function J(e,n,t){if(e._state){return e}if(n instanceof tn){if(n===e){G(e,new TypeError("You can't resolve a promise with itself"))}else if(n._state){H(n,e)}else{R(n,e)}}else if(n!==Object(n)){C(e,n)}else if(t){L(e,n)}else{A(L,e,n)}return e}function L(e,n){var t,r;try{r=n.then}catch(i){G(e,i);return}if(typeof r==="function"){t=Z(e);try{x.call(r,n,t.resolve,t.reject)}catch(a){t.reject(a)}}else{C(e,n)}}function Q(e,n){if(typeof n==="function"){n(e,e._index)}else if(n instanceof tn){I(V,e,n,e._domain||n._domain,n._trace)}else{for(var t=0,r=n.length;t<r;++t){Q(e,n[t])}}}function R(e,n){if(e._state){Q(e,n)}else if(!e._pending){e._pending=n}else if(e._pending instanceof Array){e._pending.push(n)}else{e._pending=[e._pending,n]}}function U(e,n,t){if(e._state){t(e,n)}else if(!e._pending){e._pending=t;e._index=n}else{R(n===e._index?t:function(e,r){t(e,n)})}}function V(e,n){var t=e._state===F?n._cb:n._eb;n._cb=null;n._eb=null;n._domain=null;if(t===null){H(e,n)}else{X(n,t,e._value)}}function X(e,n,t){var r;try{r=n(t)}catch(i){G(e,i);return}J(e,r,true)}function Z(e){var n=false;return{promise:e,resolve:function(t){if(!n){n=true;J(e,t,false)}},reject:function(t){if(!n){n=true;G(e,t)}}}}B.defer=en;function en(){return Z(new tn)}B.reject=nn;function nn(e){var n=new tn;G(n,e);return n}function tn(){this._state=0;this._value=void 0;this._domain=null;this._cb=null;this._eb=null;this._index=0;this._pending=null;this._trace=null}tn.prototype.then=function(e,n){var r=new tn;if(B.longStackSupport){r._trace={parent:t,stack:(new Error).stack}}r._cb=typeof e==="function"?e:null;r._eb=typeof n==="function"?n:null;if(s){r._domain=process.domain}R(this,r);return r};tn.prototype.done=function(e,n){var t=this;if(e||n){t=t.then(e,n)}R(t,Y)};tn.prototype.fail=function(e){return this.then(null,e)};tn.prototype.spread=function(e,n){return this.then(an).then(function(n){return k.call(e,void 0,n)},n)};tn.prototype.timeout=function(e,n){var r=new tn;if(this._state!==D){H(this,r)}else{var i=t;var a=setTimeout(function(){t=i;G(r,new Error(n||"Timed out after "+e+" ms"))},e);R(this,function(e){clearTimeout(a);H(e,r)})}return r};tn.prototype.delay=function(e){var n=en();this.then(function(r){var i=t;setTimeout(function(){t=i;n.resolve(r)},e)},n.reject);return n.promise};tn.prototype.all=function(){return this.then(an)};tn.prototype.allSettled=function(){return this.then(rn)};tn.prototype.inspect=function(){switch(this._state){case D:return{state:"pending"};case F:return{state:"fulfilled",value:this._value};case P:return{state:"rejected",reason:this._value};default:throw new TypeError("invalid state")}};tn.prototype.nodeify=function(e){if(e){this.done(function(n){e(null,n)},e);return void 0}else{return this}};B.allSettled=rn;function rn(e){var n=new tn;var t=e.length;if(typeof t!=="number"){G(n,new TypeError("input not array-like"));return n}var r=0;var i=new Array(t);function a(e,t){i[t]=e.inspect();if(--r===0){C(n,i)}}for(var o=0;o<t;++o){if(o in e){var u=B(e[o]);if(u._state){i[o]=u.inspect()}else{++r;U(u,o,a)}}}if(r===0){C(n,i)}return n}B.all=an;function an(e){var n=new tn;var t=e.length;if(typeof t!=="number"){G(n,new TypeError("input not array-like"));return n}var r=0;var i=new Array(t);function a(e,t){if(e._state===P){H(e,n);return}i[t]=e._value;if(--r===0){C(n,i)}}for(var o=0;o<t;++o){if(o in e){var u=B(e[o]);if(u._state===F){i[o]=u._value}else if(u._state===P){H(u,n);break}else{++r;U(u,o,a)}}}if(r===0){C(n,i)}return n}B.spread=on;function on(e,n,t){return an(e).then(function(e){return k.call(n,void 0,e)},t)}B.promised=un;function un(e){function n(n){return x.apply(e,n)}return function(){var e=arguments.length;var t=new Array(e+1);t[0]=this;for(var r=0;r<e;++r){t[r+1]=arguments[r]}return an(t).then(n)}}B.onerror=null;B.nextTick=q;var ln=i();return B});
(function(e){if(typeof module!=="undefined"&&module&&module.exports){module.exports=e()}else if(typeof define==="function"&&define.amd){define(e)}else{P=e()}})(function(){"use strict";var e=a(),n,t=null;function r(){var e=(new Error).stack;if(!e){return null}var n=[o(e,1)];if(t){n=n.concat(t);if(n.length===128){n.pop()}}return n}function i(e){var n=/at .+ \(([\s\S]+):(\d+):(?:\d+)\)$/.exec(e)||/at ([^ ]+):(\d+):(?:\d+)$/.exec(e)||/@([\s\S]+):(\d+):(?:\d+)$/.exec(e);return n?{fileName:n[1],lineNumber:Number(n[2])}:null}function a(){var e=(new Error).stack;if(!e){return 0}var t=e.split("\n");var r=t[0].indexOf("@")>0?t[1]:t[2];var a=i(r);if(!a){return 0}n=a.fileName;return a.lineNumber}function o(e,n){var t=e.split("\n");var r=[];for(var i=n|0,a=t.length;i<a;++i){var o=t[i];if(o&&!u(o)&&!l(o)){r.push(o)}}return r.join("\n")}function u(e){return e.indexOf("(module.js:")!==-1||e.indexOf("(node.js:")!==-1}function l(t){var r=i(t);return!!r&&r.fileName===n&&r.lineNumber>=e&&r.lineNumber<=pn}var f="\nFrom previous event:\n";function s(e){if(e instanceof Error&&e.stack&&e.stack.indexOf(f)===-1){e.stack=[o(e.stack,0)].concat(t||[]).join(f)}}var c=T(typeof process)&&process!=null&&{}.toString.call(process)==="[object process]",p=typeof setImmediate==="function",v=T(typeof MutationObserver)&&MutationObserver||T(typeof WebKitMutationObserver)&&WebKitMutationObserver,d=new S,_=d,h=false,m=0,y=c?$:v?K(O):W(O),b=[],g=W(N),w,k,x=T.call,j=T.apply;_.next=d;function S(){this.task=null;this.a=null;this.b=null;this.domain=null;this.trace=null;this.next=null}function T(e){return e==="object"||e==="function"}function N(){if(b.length){throw b.shift()}}function O(){while(d!==_){var e=d=d.next;if(m>=1024){_.next=_.next.next}else{++m}t=e.trace;if(e.domain){I(e.domain,e.task,e.a,e.b);e.domain=null}else{(1,e.task)(e.a,e.b)}e.task=null;e.a=null;e.b=null;e.trace=null}h=false;t=null}function E(){d.task=null;d.a=null;d.b=null;d.domain=null;d.trace=null;y()}function I(e,n,t,r){if(e._disposed){return}e.enter();n(t,r);e.exit()}function M(e,n,t){A(e,n,t,c?process.domain:null,L.longStackSupport?r():null)}function A(e,n,t,r,i){var a=_.next;if(a===d){a=new S;_.next=a;a.next=d}else{--m}_=a;a.task=e;a.a=n;a.b=t;a.domain=r;a.trace=i;if(!h){h=true;y()}}function $(){var e=process.domain;if(e){if(!k)k=(1,require)("domain");k.active=process.domain=null}if(h&&p){setImmediate(O)}else{process.nextTick(O)}if(e){k.active=process.domain=e}}function K(e){var n=1;var t=document.createTextNode("");var r=new v(e);r.observe(t,{characterData:true});return function(){n=-n;t.data=n}}function W(e){return function(){var n=setTimeout(r,0);var t=setInterval(r,50);function r(){clearTimeout(n);clearInterval(t);e()}}}if(c){w=function(e){E();throw e}}else{w=function(e){b.push(e);g()}}function q(e,n){try{e.call()}catch(t){n(t)}}function D(e){M(q,e,w)}var F=0;var P=1;var Y=2;var z=-1;var B=-2;var C=-3;var G=-4;function H(e){if(e._state===Y){A(J,e._value,w,e._domain,null)}}function J(e,n){if(L.onerror){try{(1,L.onerror)(e)}catch(t){n(t)}}else{n(e)}}function L(e){return e instanceof un?e:V(new un,e,false)}L.longStackSupport=false;function Q(e,n){if(e._state){return}e._state=P;e._value=n;if(e._pending){Z(e,e._op,e._pending);e._pending=null}}function R(e,n){if(e._state){return}if(t){s(n)}e._state=Y;e._value=n;if(c){e._domain=process.domain}if(e._pending){Z(e,e._op,e._pending);e._pending=null}}function U(e,n){if(n._state){return}n._state=e._state;n._value=e._value;n._domain=e._domain;if(n._pending){Z(n,n._op,n._pending);n._pending=null}}function V(e,n,t){if(e._state){return e}if(n instanceof un){if(n===e){R(e,new TypeError("You can't resolve a promise with itself"))}else if(n._state){U(n,e)}else{en(n,C,e)}}else if(n!==Object(n)){Q(e,n)}else if(t){X(e,n)}else{M(X,e,n)}return e}function X(e,n){var t,r;try{r=n.then}catch(i){R(e,i);return}if(typeof r==="function"){t=rn(e);try{x.call(r,n,t.resolve,t.reject)}catch(a){t.reject(a)}}else{Q(e,n)}}function Z(e,n,t){switch(n){case z:t(e);break;case B:A(nn,e,t,e._domain||t._domain,t._trace);break;case C:A(U,e,t,null,null);break;case G:for(var r=0,i=t.length;r<i;r+=2){Z(e,t[r],t[r+1])}break;default:t(e,n)}}function en(e,n,t){if(e._state){Z(e,n,t)}else if(!e._pending){e._pending=t;e._op=n}else if(e._op===G){e._pending.push(n,t)}else{e._pending=[e._op,e._pending,n,t];e._op=G}}function nn(e,n){var t=e._state===P?n._cb:n._eb;n._cb=null;n._eb=null;n._domain=null;n._trace=null;if(t===null){U(e,n)}else{tn(n,t,e._value)}}function tn(e,n,t){var r;try{r=n(t)}catch(i){R(e,i);return}V(e,r,true)}function rn(e){var n=false;return{promise:e,resolve:function(t){if(!n){n=true;V(e,t,false)}},reject:function(t){if(!n){n=true;R(e,t)}}}}L.defer=an;function an(){return rn(new un)}L.reject=on;function on(e){var n=new un;R(n,e);return n}function un(){this._state=0;this._value=void 0;this._domain=null;this._cb=null;this._eb=null;this._op=0;this._pending=null;this._trace=null}un.prototype.then=function(e,n){var t=new un;t._cb=typeof e==="function"?e:null;t._eb=typeof n==="function"?n:null;if(L.longStackSupport){t._trace=r()}if(c){t._domain=process.domain}en(this,B,t);return t};un.prototype.done=function(e,n){var t=this;if(e||n){t=t.then(e,n)}en(t,z,H)};un.prototype.fail=function(e){return this.then(null,e)};un.prototype.spread=function(e,n){return this.then(fn).then(function(n){return j.call(e,void 0,n)},n)};un.prototype.timeout=function(e,n){var i=new un;if(this._state!==F){U(this,i)}else{var a=L.longStackSupport?r():null;var o=setTimeout(function(){t=a;R(i,new Error(n||"Timed out after "+e+" ms"))},e);en(this,z,function(e){clearTimeout(o);U(e,i)})}return i};un.prototype.delay=function(e){var n=an();this.then(function(r){var i=t;setTimeout(function(){t=i;n.resolve(r)},e)},n.reject);return n.promise};un.prototype.all=function(){return this.then(fn)};un.prototype.allSettled=function(){return this.then(ln)};un.prototype.inspect=function(){switch(this._state){case F:return{state:"pending"};case P:return{state:"fulfilled",value:this._value};case Y:return{state:"rejected",reason:this._value};default:throw new TypeError("invalid state")}};un.prototype.nodeify=function(e){if(e){this.done(function(n){e(null,n)},e);return void 0}else{return this}};L.allSettled=ln;function ln(e){var n=new un;var t=e.length;if(typeof t!=="number"){R(n,new TypeError("input not array-like"));return n}var r=0;var i=new Array(t);function a(e,t){i[t]=e.inspect();if(--r===0){Q(n,i)}}for(var o=0;o<t;++o){if(o in e){var u=L(e[o]);if(u._state){i[o]=u.inspect()}else{++r;en(u,o,a)}}}if(r===0){Q(n,i)}return n}L.all=fn;function fn(e){var n=new un;var t=e.length;if(typeof t!=="number"){R(n,new TypeError("input not array-like"));return n}var r=0;var i=new Array(t);function a(e,t){if(e._state===Y){U(e,n);return}i[t]=e._value;if(--r===0){Q(n,i)}}for(var o=0;o<t;++o){if(o in e){var u=L(e[o]);if(u._state===P){i[o]=u._value}else if(u._state===Y){U(u,n);break}else{++r;en(u,o,a)}}}if(r===0){Q(n,i)}return n}L.spread=sn;function sn(e,n,t){return fn(e).then(function(e){return j.call(n,void 0,e)},t)}L.promised=cn;function cn(e){function n(n){return x.apply(e,n)}return function(){var e=arguments.length;var t=new Array(e+1);t[0]=this;for(var r=0;r<e;++r){t[r+1]=arguments[r]}return fn(t).then(n)}}L.onerror=null;L.nextTick=D;var pn=a();return L});
{
"name": "p-promise",
"version": "0.3.7",
"version": "0.3.8",
"description": "A simple Promises/A+ library.",

@@ -5,0 +5,0 @@ "author": "Robert Katić <robert.katic@gmail.com> (https://github.com/rkatic)",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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