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

es6-promise-plugin

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-promise-plugin - npm Package Compare versions

Comparing version 2.3.0 to 3.0.0

24

.tmp/bundle.js
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
require('es6-promise').polyfill();
if (window.Promise === undefined) {
require('es6-promise').polyfill();
}
},{"es6-promise":2}],2:[function(require,module,exports){

@@ -11,3 +14,3 @@ (function (process,global){

* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
* @version 2.3.0
* @version 3.0.2
*/

@@ -80,11 +83,6 @@

function lib$es6$promise$asap$$useNextTick() {
var nextTick = process.nextTick;
// node version 0.10.x displays a deprecation warning when nextTick is used recursively
// setImmediate should be used instead instead
var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);
if (Array.isArray(version) && version[1] === '0' && version[2] === '10') {
nextTick = setImmediate;
}
// see https://github.com/cujojs/when/issues/410 for details
return function() {
nextTick(lib$es6$promise$asap$$flush);
process.nextTick(lib$es6$promise$asap$$flush);
};

@@ -141,3 +139,3 @@ }

function lib$es6$promise$asap$$attemptVertex() {
function lib$es6$promise$asap$$attemptVertx() {
try {

@@ -162,3 +160,3 @@ var r = require;

} else if (lib$es6$promise$asap$$browserWindow === undefined && typeof require === 'function') {
lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$attemptVertex();
lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$attemptVertx();
} else {

@@ -176,3 +174,3 @@ lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout();

function lib$es6$promise$$internal$$selfFullfillment() {
function lib$es6$promise$$internal$$selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");

@@ -261,3 +259,3 @@ }

if (promise === value) {
lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFullfillment());
lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFulfillment());
} else if (lib$es6$promise$utils$$objectOrFunction(value)) {

@@ -264,0 +262,0 @@ lib$es6$promise$$internal$$handleMaybeThenable(promise, value);

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

!function t(e,n,r){function o(s,u){if(!n[s]){if(!e[s]){var c="function"==typeof require&&require;if(!u&&c)return c(s,!0);if(i)return i(s,!0);throw new Error("Cannot find module '"+s+"'")}var a=n[s]={exports:{}};e[s][0].call(a.exports,function(t){var n=e[s][1][t];return o(n?n:t)},a,a.exports,t,e,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t){t("es6-promise").polyfill()},{"es6-promise":2}],2:[function(t,e){(function(n,r){(function(){"use strict";function o(t){return"function"==typeof t||"object"==typeof t&&null!==t}function i(t){return"function"==typeof t}function s(t){return"object"==typeof t&&null!==t}function u(t){B=t}function c(t){Q=t}function a(){var t=n.nextTick,e=n.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(e)&&"0"===e[1]&&"10"===e[2]&&(t=setImmediate),function(){t(h)}}function f(){return function(){z(h)}}function l(){var t=0,e=new X(h),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function d(){var t=new MessageChannel;return t.port1.onmessage=h,function(){t.port2.postMessage(0)}}function p(){return function(){setTimeout(h,1)}}function h(){for(var t=0;J>t;t+=2){var e=ee[t],n=ee[t+1];e(n),ee[t]=void 0,ee[t+1]=void 0}J=0}function v(){try{var e=t,n=e("vertx");return z=n.runOnLoop||n.runOnContext,f()}catch(r){return p()}}function _(){}function w(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function m(t){try{return t.then}catch(e){return ie.error=e,ie}}function b(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function g(t,e,n){Q(function(t){var r=!1,o=b(n,e,function(n){r||(r=!0,e!==n?j(t,n):S(t,n))},function(e){r||(r=!0,T(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,T(t,o))},t)}function A(t,e){e._state===re?S(t,e._result):e._state===oe?T(t,e._result):M(e,void 0,function(e){j(t,e)},function(e){T(t,e)})}function E(t,e){if(e.constructor===t.constructor)A(t,e);else{var n=m(e);n===ie?T(t,ie.error):void 0===n?S(t,e):i(n)?g(t,e,n):S(t,e)}}function j(t,e){t===e?T(t,w()):o(e)?E(t,e):S(t,e)}function x(t){t._onerror&&t._onerror(t._result),P(t)}function S(t,e){t._state===ne&&(t._result=e,t._state=re,0!==t._subscribers.length&&Q(P,t))}function T(t,e){t._state===ne&&(t._state=oe,t._result=e,Q(x,t))}function M(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+re]=n,o[i+oe]=r,0===i&&t._state&&Q(P,t)}function P(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,o,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?O(n,r,o,i):o(i);t._subscribers.length=0}}function C(){this.error=null}function k(t,e){try{return t(e)}catch(n){return se.error=n,se}}function O(t,e,n,r){var o,s,u,c,a=i(n);if(a){if(o=k(n,r),o===se?(c=!0,s=o.error,o=null):u=!0,e===o)return T(e,y()),void 0}else o=r,u=!0;e._state!==ne||(a&&u?j(e,o):c?T(e,s):t===re?S(e,o):t===oe&&T(e,o))}function I(t,e){try{e(function(e){j(t,e)},function(e){T(t,e)})}catch(n){T(t,n)}}function q(t,e){var n=this;n._instanceConstructor=t,n.promise=new t(_),n._validateInput(e)?(n._input=e,n.length=e.length,n._remaining=e.length,n._init(),0===n.length?S(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&S(n.promise,n._result))):T(n.promise,n._validationError())}function L(t){return new ue(this,t).promise}function Y(t){function e(t){j(o,t)}function n(t){T(o,t)}var r=this,o=new r(_);if(!H(t))return T(o,new TypeError("You must pass an array to race.")),o;for(var i=t.length,s=0;o._state===ne&&i>s;s++)M(r.resolve(t[s]),void 0,e,n);return o}function F(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(_);return j(n,t),n}function D(t){var e=this,n=new e(_);return T(n,t),n}function K(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this._id=de++,this._state=void 0,this._result=void 0,this._subscribers=[],_!==t&&(i(t)||K(),this instanceof U||N(),I(this,t))}function W(){var t;if("undefined"!=typeof r)t=r;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(t.Promise=pe)}var $;$=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var z,B,G,H=$,J=0,Q=({}.toString,function(t,e){ee[J]=t,ee[J+1]=e,J+=2,2===J&&(B?B(h):G())}),R="undefined"!=typeof window?window:void 0,V=R||{},X=V.MutationObserver||V.WebKitMutationObserver,Z="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ee=new Array(1e3);G=Z?a():X?l():te?d():void 0===R&&"function"==typeof t?v():p();var ne=void 0,re=1,oe=2,ie=new C,se=new C;q.prototype._validateInput=function(t){return H(t)},q.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},q.prototype._init=function(){this._result=new Array(this.length)};var ue=q;q.prototype._enumerate=function(){for(var t=this,e=t.length,n=t.promise,r=t._input,o=0;n._state===ne&&e>o;o++)t._eachEntry(r[o],o)},q.prototype._eachEntry=function(t,e){var n=this,r=n._instanceConstructor;s(t)?t.constructor===r&&t._state!==ne?(t._onerror=null,n._settledAt(t._state,e,t._result)):n._willSettleAt(r.resolve(t),e):(n._remaining--,n._result[e]=t)},q.prototype._settledAt=function(t,e,n){var r=this,o=r.promise;o._state===ne&&(r._remaining--,t===oe?T(o,n):r._result[e]=n),0===r._remaining&&S(o,r._result)},q.prototype._willSettleAt=function(t,e){var n=this;M(t,void 0,function(t){n._settledAt(re,e,t)},function(t){n._settledAt(oe,e,t)})};var ce=L,ae=Y,fe=F,le=D,de=0,pe=U;U.all=ce,U.race=ae,U.resolve=fe,U.reject=le,U._setScheduler=u,U._setAsap=c,U._asap=Q,U.prototype={constructor:U,then:function(t,e){var n=this,r=n._state;if(r===re&&!t||r===oe&&!e)return this;var o=new this.constructor(_),i=n._result;if(r){var s=arguments[r-1];Q(function(){O(r,o,s,i)})}else M(n,o,t,e);return o},"catch":function(t){return this.then(null,t)}};var he=W,ve={Promise:pe,polyfill:he};"function"==typeof define&&define.amd?define(function(){return ve}):"undefined"!=typeof e&&e.exports?e.exports=ve:"undefined"!=typeof this&&(this.ES6Promise=ve),he()}).call(this)}).call(this,t("/usr/local/share/npm/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"/usr/local/share/npm/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3}],3:[function(t,e){var n=e.exports={};n.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},{}]},{},[1]);
!function t(n,e,r){function o(s,u){if(!e[s]){if(!n[s]){var c="function"==typeof require&&require;if(!u&&c)return c(s,!0);if(i)return i(s,!0);throw new Error("Cannot find module '"+s+"'")}var a=e[s]={exports:{}};n[s][0].call(a.exports,function(t){var e=n[s][1][t];return o(e?e:t)},a,a.exports,t,n,e,r)}return e[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t){void 0===window.Promise&&t("es6-promise").polyfill()},{"es6-promise":2}],2:[function(t,n){(function(e,r){(function(){"use strict";function o(t){return"function"==typeof t||"object"==typeof t&&null!==t}function i(t){return"function"==typeof t}function s(t){return"object"==typeof t&&null!==t}function u(t){G=t}function c(t){R=t}function a(){return function(){e.nextTick(h)}}function f(){return function(){B(h)}}function l(){var t=0,n=new Z(h),e=document.createTextNode("");return n.observe(e,{characterData:!0}),function(){e.data=t=++t%2}}function d(){var t=new MessageChannel;return t.port1.onmessage=h,function(){t.port2.postMessage(0)}}function p(){return function(){setTimeout(h,1)}}function h(){for(var t=0;Q>t;t+=2){var n=nn[t],e=nn[t+1];n(e),nn[t]=void 0,nn[t+1]=void 0}Q=0}function _(){try{var n=t,e=n("vertx");return B=e.runOnLoop||e.runOnContext,f()}catch(r){return p()}}function v(){}function w(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function m(t){try{return t.then}catch(n){return sn.error=n,sn}}function b(t,n,e,r){try{t.call(n,e,r)}catch(o){return o}}function g(t,n,e){R(function(t){var r=!1,o=b(e,n,function(e){r||(r=!0,n!==e?j(t,e):S(t,e))},function(n){r||(r=!0,T(t,n))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,T(t,o))},t)}function A(t,n){n._state===rn?S(t,n._result):n._state===on?T(t,n._result):P(n,void 0,function(n){j(t,n)},function(n){T(t,n)})}function E(t,n){if(n.constructor===t.constructor)A(t,n);else{var e=m(n);e===sn?T(t,sn.error):void 0===e?S(t,n):i(e)?g(t,n,e):S(t,n)}}function j(t,n){t===n?T(t,w()):o(n)?E(t,n):S(t,n)}function x(t){t._onerror&&t._onerror(t._result),M(t)}function S(t,n){t._state===en&&(t._result=n,t._state=rn,0!==t._subscribers.length&&R(M,t))}function T(t,n){t._state===en&&(t._state=on,t._result=n,R(x,t))}function P(t,n,e,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=n,o[i+rn]=e,o[i+on]=r,0===i&&t._state&&R(M,t)}function M(t){var n=t._subscribers,e=t._state;if(0!==n.length){for(var r,o,i=t._result,s=0;s<n.length;s+=3)r=n[s],o=n[s+e],r?O(e,r,o,i):o(i);t._subscribers.length=0}}function C(){this.error=null}function k(t,n){try{return t(n)}catch(e){return un.error=e,un}}function O(t,n,e,r){var o,s,u,c,a=i(e);if(a){if(o=k(e,r),o===un?(c=!0,s=o.error,o=null):u=!0,n===o)return T(n,y()),void 0}else o=r,u=!0;n._state!==en||(a&&u?j(n,o):c?T(n,s):t===rn?S(n,o):t===on&&T(n,o))}function q(t,n){try{n(function(n){j(t,n)},function(n){T(t,n)})}catch(e){T(t,e)}}function I(t,n){var e=this;e._instanceConstructor=t,e.promise=new t(v),e._validateInput(n)?(e._input=n,e.length=n.length,e._remaining=n.length,e._init(),0===e.length?S(e.promise,e._result):(e.length=e.length||0,e._enumerate(),0===e._remaining&&S(e.promise,e._result))):T(e.promise,e._validationError())}function L(t){return new cn(this,t).promise}function Y(t){function n(t){j(o,t)}function e(t){T(o,t)}var r=this,o=new r(v);if(!J(t))return T(o,new TypeError("You must pass an array to race.")),o;for(var i=t.length,s=0;o._state===en&&i>s;s++)P(r.resolve(t[s]),void 0,n,e);return o}function F(t){var n=this;if(t&&"object"==typeof t&&t.constructor===n)return t;var e=new n(v);return j(e,t),e}function D(t){var n=this,e=new n(v);return T(e,t),e}function K(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this._id=pn++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==t&&(i(t)||K(),this instanceof U||N(),q(this,t))}function W(){var t;if("undefined"!=typeof r)t=r;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(n){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;(!e||"[object Promise]"!==Object.prototype.toString.call(e.resolve())||e.cast)&&(t.Promise=hn)}var z;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B,G,H,J=z,Q=0,R=({}.toString,function(t,n){nn[Q]=t,nn[Q+1]=n,Q+=2,2===Q&&(G?G(h):H())}),V="undefined"!=typeof window?window:void 0,X=V||{},Z=X.MutationObserver||X.WebKitMutationObserver,$="undefined"!=typeof e&&"[object process]"==={}.toString.call(e),tn="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,nn=new Array(1e3);H=$?a():Z?l():tn?d():void 0===V&&"function"==typeof t?_():p();var en=void 0,rn=1,on=2,sn=new C,un=new C;I.prototype._validateInput=function(t){return J(t)},I.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},I.prototype._init=function(){this._result=new Array(this.length)};var cn=I;I.prototype._enumerate=function(){for(var t=this,n=t.length,e=t.promise,r=t._input,o=0;e._state===en&&n>o;o++)t._eachEntry(r[o],o)},I.prototype._eachEntry=function(t,n){var e=this,r=e._instanceConstructor;s(t)?t.constructor===r&&t._state!==en?(t._onerror=null,e._settledAt(t._state,n,t._result)):e._willSettleAt(r.resolve(t),n):(e._remaining--,e._result[n]=t)},I.prototype._settledAt=function(t,n,e){var r=this,o=r.promise;o._state===en&&(r._remaining--,t===on?T(o,e):r._result[n]=e),0===r._remaining&&S(o,r._result)},I.prototype._willSettleAt=function(t,n){var e=this;P(t,void 0,function(t){e._settledAt(rn,n,t)},function(t){e._settledAt(on,n,t)})};var an=L,fn=Y,ln=F,dn=D,pn=0,hn=U;U.all=an,U.race=fn,U.resolve=ln,U.reject=dn,U._setScheduler=u,U._setAsap=c,U._asap=R,U.prototype={constructor:U,then:function(t,n){var e=this,r=e._state;if(r===rn&&!t||r===on&&!n)return this;var o=new this.constructor(v),i=e._result;if(r){var s=arguments[r-1];R(function(){O(r,o,s,i)})}else P(e,o,t,n);return o},"catch":function(t){return this.then(null,t)}};var _n=W,vn={Promise:hn,polyfill:_n};"function"==typeof define&&define.amd?define(function(){return vn}):"undefined"!=typeof n&&n.exports?n.exports=vn:"undefined"!=typeof this&&(this.ES6Promise=vn),_n()}).call(this)}).call(this,t("/usr/local/share/npm/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"/usr/local/share/npm/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3}],3:[function(t,n){var e=n.exports={};e.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,n="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(n){var e=[];return window.addEventListener("message",function(t){var n=t.source;if((n===window||null===n)&&"process-tick"===t.data&&(t.stopPropagation(),e.length>0)){var r=e.shift();r()}},!0),function(t){e.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.binding=function(){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(){throw new Error("process.chdir is not supported")}},{}]},{},[1]);
{
"name": "es6-promise-plugin",
"version": "2.3.0",
"version": "3.0.0",
"description": "ES6-Promises polyfill for Cordova/PhoneGap",

@@ -9,3 +9,3 @@ "main": "www/promise.js",

"devDependencies": {
"es6-promise": "^2.3.0"
"es6-promise": "^3.0.0"
},

@@ -12,0 +12,0 @@ "scripts": {

@@ -6,7 +6,6 @@ /*!

* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
* @version 2.3.0
* @version 3.0.2
*/
!function t(e,n,r){function o(s,u){if(!n[s]){if(!e[s]){var c="function"==typeof require&&require;if(!u&&c)return c(s,!0);if(i)return i(s,!0);throw new Error("Cannot find module '"+s+"'")}var a=n[s]={exports:{}};e[s][0].call(a.exports,function(t){var n=e[s][1][t];return o(n?n:t)},a,a.exports,t,e,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t){t("es6-promise").polyfill()},{"es6-promise":2}],2:[function(t,e){(function(n,r){(function(){"use strict";function o(t){return"function"==typeof t||"object"==typeof t&&null!==t}function i(t){return"function"==typeof t}function s(t){return"object"==typeof t&&null!==t}function u(t){B=t}function c(t){Q=t}function a(){var t=n.nextTick,e=n.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(e)&&"0"===e[1]&&"10"===e[2]&&(t=setImmediate),function(){t(h)}}function f(){return function(){z(h)}}function l(){var t=0,e=new X(h),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function d(){var t=new MessageChannel;return t.port1.onmessage=h,function(){t.port2.postMessage(0)}}function p(){return function(){setTimeout(h,1)}}function h(){for(var t=0;J>t;t+=2){var e=ee[t],n=ee[t+1];e(n),ee[t]=void 0,ee[t+1]=void 0}J=0}function v(){try{var e=t,n=e("vertx");return z=n.runOnLoop||n.runOnContext,f()}catch(r){return p()}}function _(){}function w(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function m(t){try{return t.then}catch(e){return ie.error=e,ie}}function b(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function g(t,e,n){Q(function(t){var r=!1,o=b(n,e,function(n){r||(r=!0,e!==n?j(t,n):S(t,n))},function(e){r||(r=!0,T(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,T(t,o))},t)}function A(t,e){e._state===re?S(t,e._result):e._state===oe?T(t,e._result):M(e,void 0,function(e){j(t,e)},function(e){T(t,e)})}function E(t,e){if(e.constructor===t.constructor)A(t,e);else{var n=m(e);n===ie?T(t,ie.error):void 0===n?S(t,e):i(n)?g(t,e,n):S(t,e)}}function j(t,e){t===e?T(t,w()):o(e)?E(t,e):S(t,e)}function x(t){t._onerror&&t._onerror(t._result),P(t)}function S(t,e){t._state===ne&&(t._result=e,t._state=re,0!==t._subscribers.length&&Q(P,t))}function T(t,e){t._state===ne&&(t._state=oe,t._result=e,Q(x,t))}function M(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+re]=n,o[i+oe]=r,0===i&&t._state&&Q(P,t)}function P(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,o,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?O(n,r,o,i):o(i);t._subscribers.length=0}}function C(){this.error=null}function k(t,e){try{return t(e)}catch(n){return se.error=n,se}}function O(t,e,n,r){var o,s,u,c,a=i(n);if(a){if(o=k(n,r),o===se?(c=!0,s=o.error,o=null):u=!0,e===o)return T(e,y()),void 0}else o=r,u=!0;e._state!==ne||(a&&u?j(e,o):c?T(e,s):t===re?S(e,o):t===oe&&T(e,o))}function I(t,e){try{e(function(e){j(t,e)},function(e){T(t,e)})}catch(n){T(t,n)}}function q(t,e){var n=this;n._instanceConstructor=t,n.promise=new t(_),n._validateInput(e)?(n._input=e,n.length=e.length,n._remaining=e.length,n._init(),0===n.length?S(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&S(n.promise,n._result))):T(n.promise,n._validationError())}function L(t){return new ue(this,t).promise}function Y(t){function e(t){j(o,t)}function n(t){T(o,t)}var r=this,o=new r(_);if(!H(t))return T(o,new TypeError("You must pass an array to race.")),o;for(var i=t.length,s=0;o._state===ne&&i>s;s++)M(r.resolve(t[s]),void 0,e,n);return o}function F(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(_);return j(n,t),n}function D(t){var e=this,n=new e(_);return T(n,t),n}function K(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this._id=de++,this._state=void 0,this._result=void 0,this._subscribers=[],_!==t&&(i(t)||K(),this instanceof U||N(),I(this,t))}function W(){var t;if("undefined"!=typeof r)t=r;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(t.Promise=pe)}var $;$=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var z,B,G,H=$,J=0,Q=({}.toString,function(t,e){ee[J]=t,ee[J+1]=e,J+=2,2===J&&(B?B(h):G())}),R="undefined"!=typeof window?window:void 0,V=R||{},X=V.MutationObserver||V.WebKitMutationObserver,Z="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ee=new Array(1e3);G=Z?a():X?l():te?d():void 0===R&&"function"==typeof t?v():p();var ne=void 0,re=1,oe=2,ie=new C,se=new C;q.prototype._validateInput=function(t){return H(t)},q.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},q.prototype._init=function(){this._result=new Array(this.length)};var ue=q;q.prototype._enumerate=function(){for(var t=this,e=t.length,n=t.promise,r=t._input,o=0;n._state===ne&&e>o;o++)t._eachEntry(r[o],o)},q.prototype._eachEntry=function(t,e){var n=this,r=n._instanceConstructor;s(t)?t.constructor===r&&t._state!==ne?(t._onerror=null,n._settledAt(t._state,e,t._result)):n._willSettleAt(r.resolve(t),e):(n._remaining--,n._result[e]=t)},q.prototype._settledAt=function(t,e,n){var r=this,o=r.promise;o._state===ne&&(r._remaining--,t===oe?T(o,n):r._result[e]=n),0===r._remaining&&S(o,r._result)},q.prototype._willSettleAt=function(t,e){var n=this;M(t,void 0,function(t){n._settledAt(re,e,t)},function(t){n._settledAt(oe,e,t)})};var ce=L,ae=Y,fe=F,le=D,de=0,pe=U;U.all=ce,U.race=ae,U.resolve=fe,U.reject=le,U._setScheduler=u,U._setAsap=c,U._asap=Q,U.prototype={constructor:U,then:function(t,e){var n=this,r=n._state;if(r===re&&!t||r===oe&&!e)return this;var o=new this.constructor(_),i=n._result;if(r){var s=arguments[r-1];Q(function(){O(r,o,s,i)})}else M(n,o,t,e);return o},"catch":function(t){return this.then(null,t)}};var he=W,ve={Promise:pe,polyfill:he};"function"==typeof define&&define.amd?define(function(){return ve}):"undefined"!=typeof e&&e.exports?e.exports=ve:"undefined"!=typeof this&&(this.ES6Promise=ve),he()}).call(this)}).call(this,t("/usr/local/share/npm/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"/usr/local/share/npm/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3}],3:[function(t,e){var n=e.exports={};n.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},{}]},{},[1]);
!function t(n,e,r){function o(s,u){if(!e[s]){if(!n[s]){var c="function"==typeof require&&require;if(!u&&c)return c(s,!0);if(i)return i(s,!0);throw new Error("Cannot find module '"+s+"'")}var a=e[s]={exports:{}};n[s][0].call(a.exports,function(t){var e=n[s][1][t];return o(e?e:t)},a,a.exports,t,n,e,r)}return e[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t){void 0===window.Promise&&t("es6-promise").polyfill()},{"es6-promise":2}],2:[function(t,n){(function(e,r){(function(){"use strict";function o(t){return"function"==typeof t||"object"==typeof t&&null!==t}function i(t){return"function"==typeof t}function s(t){return"object"==typeof t&&null!==t}function u(t){G=t}function c(t){R=t}function a(){return function(){e.nextTick(h)}}function f(){return function(){B(h)}}function l(){var t=0,n=new Z(h),e=document.createTextNode("");return n.observe(e,{characterData:!0}),function(){e.data=t=++t%2}}function d(){var t=new MessageChannel;return t.port1.onmessage=h,function(){t.port2.postMessage(0)}}function p(){return function(){setTimeout(h,1)}}function h(){for(var t=0;Q>t;t+=2){var n=nn[t],e=nn[t+1];n(e),nn[t]=void 0,nn[t+1]=void 0}Q=0}function _(){try{var n=t,e=n("vertx");return B=e.runOnLoop||e.runOnContext,f()}catch(r){return p()}}function v(){}function w(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function m(t){try{return t.then}catch(n){return sn.error=n,sn}}function b(t,n,e,r){try{t.call(n,e,r)}catch(o){return o}}function g(t,n,e){R(function(t){var r=!1,o=b(e,n,function(e){r||(r=!0,n!==e?j(t,e):S(t,e))},function(n){r||(r=!0,T(t,n))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,T(t,o))},t)}function A(t,n){n._state===rn?S(t,n._result):n._state===on?T(t,n._result):P(n,void 0,function(n){j(t,n)},function(n){T(t,n)})}function E(t,n){if(n.constructor===t.constructor)A(t,n);else{var e=m(n);e===sn?T(t,sn.error):void 0===e?S(t,n):i(e)?g(t,n,e):S(t,n)}}function j(t,n){t===n?T(t,w()):o(n)?E(t,n):S(t,n)}function x(t){t._onerror&&t._onerror(t._result),M(t)}function S(t,n){t._state===en&&(t._result=n,t._state=rn,0!==t._subscribers.length&&R(M,t))}function T(t,n){t._state===en&&(t._state=on,t._result=n,R(x,t))}function P(t,n,e,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=n,o[i+rn]=e,o[i+on]=r,0===i&&t._state&&R(M,t)}function M(t){var n=t._subscribers,e=t._state;if(0!==n.length){for(var r,o,i=t._result,s=0;s<n.length;s+=3)r=n[s],o=n[s+e],r?O(e,r,o,i):o(i);t._subscribers.length=0}}function C(){this.error=null}function k(t,n){try{return t(n)}catch(e){return un.error=e,un}}function O(t,n,e,r){var o,s,u,c,a=i(e);if(a){if(o=k(e,r),o===un?(c=!0,s=o.error,o=null):u=!0,n===o)return T(n,y()),void 0}else o=r,u=!0;n._state!==en||(a&&u?j(n,o):c?T(n,s):t===rn?S(n,o):t===on&&T(n,o))}function q(t,n){try{n(function(n){j(t,n)},function(n){T(t,n)})}catch(e){T(t,e)}}function I(t,n){var e=this;e._instanceConstructor=t,e.promise=new t(v),e._validateInput(n)?(e._input=n,e.length=n.length,e._remaining=n.length,e._init(),0===e.length?S(e.promise,e._result):(e.length=e.length||0,e._enumerate(),0===e._remaining&&S(e.promise,e._result))):T(e.promise,e._validationError())}function L(t){return new cn(this,t).promise}function Y(t){function n(t){j(o,t)}function e(t){T(o,t)}var r=this,o=new r(v);if(!J(t))return T(o,new TypeError("You must pass an array to race.")),o;for(var i=t.length,s=0;o._state===en&&i>s;s++)P(r.resolve(t[s]),void 0,n,e);return o}function F(t){var n=this;if(t&&"object"==typeof t&&t.constructor===n)return t;var e=new n(v);return j(e,t),e}function D(t){var n=this,e=new n(v);return T(e,t),e}function K(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this._id=pn++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==t&&(i(t)||K(),this instanceof U||N(),q(this,t))}function W(){var t;if("undefined"!=typeof r)t=r;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(n){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;(!e||"[object Promise]"!==Object.prototype.toString.call(e.resolve())||e.cast)&&(t.Promise=hn)}var z;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B,G,H,J=z,Q=0,R=({}.toString,function(t,n){nn[Q]=t,nn[Q+1]=n,Q+=2,2===Q&&(G?G(h):H())}),V="undefined"!=typeof window?window:void 0,X=V||{},Z=X.MutationObserver||X.WebKitMutationObserver,$="undefined"!=typeof e&&"[object process]"==={}.toString.call(e),tn="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,nn=new Array(1e3);H=$?a():Z?l():tn?d():void 0===V&&"function"==typeof t?_():p();var en=void 0,rn=1,on=2,sn=new C,un=new C;I.prototype._validateInput=function(t){return J(t)},I.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},I.prototype._init=function(){this._result=new Array(this.length)};var cn=I;I.prototype._enumerate=function(){for(var t=this,n=t.length,e=t.promise,r=t._input,o=0;e._state===en&&n>o;o++)t._eachEntry(r[o],o)},I.prototype._eachEntry=function(t,n){var e=this,r=e._instanceConstructor;s(t)?t.constructor===r&&t._state!==en?(t._onerror=null,e._settledAt(t._state,n,t._result)):e._willSettleAt(r.resolve(t),n):(e._remaining--,e._result[n]=t)},I.prototype._settledAt=function(t,n,e){var r=this,o=r.promise;o._state===en&&(r._remaining--,t===on?T(o,e):r._result[n]=e),0===r._remaining&&S(o,r._result)},I.prototype._willSettleAt=function(t,n){var e=this;P(t,void 0,function(t){e._settledAt(rn,n,t)},function(t){e._settledAt(on,n,t)})};var an=L,fn=Y,ln=F,dn=D,pn=0,hn=U;U.all=an,U.race=fn,U.resolve=ln,U.reject=dn,U._setScheduler=u,U._setAsap=c,U._asap=R,U.prototype={constructor:U,then:function(t,n){var e=this,r=e._state;if(r===rn&&!t||r===on&&!n)return this;var o=new this.constructor(v),i=e._result;if(r){var s=arguments[r-1];R(function(){O(r,o,s,i)})}else P(e,o,t,n);return o},"catch":function(t){return this.then(null,t)}};var _n=W,vn={Promise:hn,polyfill:_n};"function"==typeof define&&define.amd?define(function(){return vn}):"undefined"!=typeof n&&n.exports?n.exports=vn:"undefined"!=typeof this&&(this.ES6Promise=vn),_n()}).call(this)}).call(this,t("/usr/local/share/npm/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"/usr/local/share/npm/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3}],3:[function(t,n){var e=n.exports={};e.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,n="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(n){var e=[];return window.addEventListener("message",function(t){var n=t.source;if((n===window||null===n)&&"process-tick"===t.data&&(t.stopPropagation(),e.length>0)){var r=e.shift();r()}},!0),function(t){e.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.binding=function(){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(){throw new Error("process.chdir is not supported")}},{}]},{},[1]);
module.exports = Promise;

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