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

p-defer-es5

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-defer-es5 - npm Package Compare versions

Comparing version 2.0.0-master.10e6578 to 2.0.0-master.22dbfae

babel.config.commonjs.json

10

babel.config.esm.json
{
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"corejs": 3,
"version": "7.14.7"
}
]
],
"presets": [

@@ -6,3 +15,2 @@ [

{
"forceAllTransforms": true,
"modules": false

@@ -9,0 +17,0 @@ }

2

dist/p-defer-es5.production.min.js

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

!function(){var e=function(){var e={};return e.promise=new Promise((function(n,r){e.resolve=n,e.reject=r})),e},n="undefined"==typeof window?0:window;n&&(n.createDeferred=e)}();
function _createForOfIteratorHelper(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=_unsupportedIterableToArray(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==e.return||e.return()}finally{if(u)throw i}}}}function _unsupportedIterableToArray(t,n){if(t){if("string"==typeof t)return _arrayLikeToArray(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?_arrayLikeToArray(t,n):void 0}}function _arrayLikeToArray(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(){var t=Object.create,n=Object.defineProperty,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,o=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,c=function(t,n){return function(){return n||t((n={exports:{}}).exports,n),n.exports}},u=function(c){return function(t,o,c){if(o&&"object"==_typeof(o)||"function"==typeof o){var u,a=_createForOfIteratorHelper(r(o));try{var f=function(){var r=u.value;!i.call(t,r)&&"default"!==r&&n(t,r,{get:function(){return o[r]},enumerable:!(c=e(o,r))||c.enumerable})};for(a.s();!(u=a.n()).done;)f()}catch(t){a.e(t)}finally{a.f()}}return t}(function(t){return n(t,"__esModule",{value:!0})}(n(null!=c?t(o(c)):{},"default",c&&c.__esModule&&"default"in c?{get:function(){return c.default},enumerable:!0}:{value:c,enumerable:!0})),c)},a=c((function(t,n){var e=function(t){return t&&t.Math==Math&&t};n.exports=e("object"==("undefined"==typeof globalThis?"undefined":_typeof(globalThis))&&globalThis)||e("object"==("undefined"==typeof window?"undefined":_typeof(window))&&window)||e("object"==("undefined"==typeof self?"undefined":_typeof(self))&&self)||e("object"==("undefined"==typeof global?"undefined":_typeof(global))&&global)||function(){return this}()||Function("return this")()})),f=c((function(t,n){n.exports=function(t){try{return!!t()}catch(t){return!0}}})),s=c((function(t,n){var e=f();n.exports=!e((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))})),l=c((function(t){"use strict";var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,r=e&&!n.call({1:2},1);t.f=r?function(t){var n=e(this,t);return!!n&&n.enumerable}:n})),p=c((function(t,n){n.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}})),v=c((function(t,n){var e={}.toString;n.exports=function(t){return e.call(t).slice(8,-1)}})),y=c((function(t,n){var e=f(),r=v(),o="".split;n.exports=e((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==r(t)?o.call(t,""):Object(t)}:Object})),d=c((function(t,n){n.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}})),h=c((function(t,n){var e=y(),r=d();n.exports=function(t){return e(r(t))}})),g=c((function(t,n){n.exports=function(t){return"object"==_typeof(t)?null!==t:"function"==typeof t}})),m=c((function(t,n){var e=g();n.exports=function(t,n){if(!e(t))return t;var r,o;if(n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t))||"function"==typeof(r=t.valueOf)&&!e(o=r.call(t))||!n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}})),x=c((function(t,n){var e=d();n.exports=function(t){return Object(e(t))}})),b=c((function(t,n){var e=x(),r={}.hasOwnProperty;n.exports=Object.hasOwn||function(t,n){return r.call(e(t),n)}})),w=c((function(t,n){var e=a(),r=g(),o=e.document,i=r(o)&&r(o.createElement);n.exports=function(t){return i?o.createElement(t):{}}})),S=c((function(t,n){var e=s(),r=f(),o=w();n.exports=!e&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))})),j=c((function(t){var n=s(),e=l(),r=p(),o=h(),i=m(),c=b(),u=S(),a=Object.getOwnPropertyDescriptor;t.f=n?a:function(t,n){if(t=o(t),n=i(n,!0),u)try{return a(t,n)}catch(t){}if(c(t,n))return r(!e.f.call(t,n),t[n])}})),O=c((function(t,n){var e=f(),r=/#|\.prototype\./,o=function(t,n){var r=c[i(t)];return r==a||r!=u&&("function"==typeof n?e(n):!!n)},i=o.normalize=function(t){return String(t).replace(r,".").toLowerCase()},c=o.data={},u=o.NATIVE="N",a=o.POLYFILL="P";n.exports=o})),T=c((function(t,n){n.exports={}})),_=c((function(t,n){n.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}})),A=c((function(t,n){var e=_();n.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 0:return function(){return t.call(n)};case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}})),P=c((function(t,n){var e=g();n.exports=function(t){if(!e(t))throw TypeError(String(t)+" is not an object");return t}})),E=c((function(t){var n=s(),e=S(),r=P(),o=m(),i=Object.defineProperty;t.f=n?i:function(t,n,c){if(r(t),n=o(n,!0),r(c),e)try{return i(t,n,c)}catch(t){}if("get"in c||"set"in c)throw TypeError("Accessors not supported");return"value"in c&&(t[n]=c.value),t}})),L=c((function(t,n){var e=s(),r=E(),o=p();n.exports=e?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}})),I=c((function(t,n){"use strict";var e=a(),r=j().f,o=O(),i=T(),c=A(),u=L(),f=b(),s=function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n};n.exports=function(t,n){var a,l,p,v,y,d,h,g,m=t.target,x=t.global,b=t.stat,w=t.proto,S=x?e:b?e[m]:(e[m]||{}).prototype,j=x?i:i[m]||(i[m]={}),O=j.prototype;for(p in n)a=!o(x?p:m+(b?".":"#")+p,t.forced)&&S&&f(S,p),y=j[p],a&&(t.noTargetGet?d=(g=r(S,p))&&g.value:d=S[p]),v=a&&d?d:n[p],(!a||_typeof(y)!=_typeof(v))&&(h=t.bind&&a?c(v,e):t.wrap&&a?s(v):w&&"function"==typeof v?c(Function.call,v):v,(t.sham||v&&v.sham||y&&y.sham)&&u(h,"sham",!0),j[p]=h,w&&(f(i,l=m+"Prototype")||u(i,l,{}),i[l][p]=v,t.real&&O&&!O[p]&&u(O,p,v)))}})),M=c((function(){I()({global:!0},{globalThis:a()})})),k=c((function(){M()})),C=c((function(t,n){M(),n.exports=a()})),R=c((function(t,n){k();var e=C();n.exports=e})),F=c((function(t,n){n.exports=R()})),D=c((function(t,n){n.exports=!0})),N=c((function(t,n){var e=a(),r=L();n.exports=function(t,n){try{r(e,t,n)}catch(r){e[t]=n}return n}})),G=c((function(t,n){var e=a(),r=N(),o="__core-js_shared__",i=e[o]||r(o,{});n.exports=i})),V=c((function(t,n){var e=D(),r=G();(n.exports=function(t,n){return r[t]||(r[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.15.2",mode:e?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),H=c((function(t,n){var e=0,r=Math.random();n.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+r).toString(36)}})),z=c((function(t,n){var e=V(),r=H(),o=e("keys");n.exports=function(t){return o[t]||(o[t]=r(t))}})),U=c((function(t,n){var e=f();n.exports=!e((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))})),W=c((function(t,n){var e=b(),r=x(),o=z(),i=U(),c=o("IE_PROTO"),u=Object.prototype;n.exports=i?Object.getPrototypeOf:function(t){return t=r(t),e(t,c)?t[c]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}})),B=c((function(t,n){var e=g();n.exports=function(t){if(!e(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}})),q=c((function(t,n){var e=P(),r=B();n.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,n=!1,o={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(o,[]),n=o instanceof Array}catch(t){}return function(o,i){return e(o),r(i),n?t.call(o,i):o.__proto__=i,o}}():void 0)})),Y=c((function(t,n){var e=Math.ceil,r=Math.floor;n.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}})),K=c((function(t,n){var e=Y(),r=Math.min;n.exports=function(t){return t>0?r(e(t),9007199254740991):0}})),X=c((function(t,n){var e=Y(),r=Math.max,o=Math.min;n.exports=function(t,n){var i=e(t);return i<0?r(i+n,0):o(i,n)}})),$=c((function(t,n){var e=h(),r=K(),o=X(),i=function(t){return function(n,i,c){var u,a=e(n),f=r(a.length),s=o(c,f);if(t&&i!=i){for(;f>s;)if((u=a[s++])!=u)return!0}else for(;f>s;s++)if((t||s in a)&&a[s]===i)return t||s||0;return!t&&-1}};n.exports={includes:i(!0),indexOf:i(!1)}})),J=c((function(t,n){n.exports={}})),Q=c((function(t,n){var e=b(),r=h(),o=$().indexOf,i=J();n.exports=function(t,n){var c,u=r(t),a=0,f=[];for(c in u)!e(i,c)&&e(u,c)&&f.push(c);for(;n.length>a;)e(u,c=n[a++])&&(~o(f,c)||f.push(c));return f}})),Z=c((function(t,n){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]})),tt=c((function(t,n){var e=Q(),r=Z();n.exports=Object.keys||function(t){return e(t,r)}})),nt=c((function(t,n){var e=s(),r=E(),o=P(),i=tt();n.exports=e?Object.defineProperties:function(t,n){o(t);for(var e,c=i(n),u=c.length,a=0;u>a;)r.f(t,e=c[a++],n[e]);return t}})),et=c((function(t,n){var e=T(),r=a(),o=function(t){return"function"==typeof t?t:void 0};n.exports=function(t,n){return arguments.length<2?o(e[t])||o(r[t]):e[t]&&e[t][n]||r[t]&&r[t][n]}})),rt=c((function(t,n){var e=et();n.exports=e("document","documentElement")})),ot=c((function(t,n){var e,r=P(),o=nt(),i=Z(),c=J(),u=rt(),a=w(),f=z(),s="prototype",l="script",p=f("IE_PROTO"),v=function(){},y=function(t){return"<script>"+t+"</"+l+">"},d=function(){try{e=document.domain&&new ActiveXObject("htmlfile")}catch(t){}d=e?function(t){t.write(y("")),t.close();var n=t.parentWindow.Object;return t=null,n}(e):function(){var t,n=a("iframe");return n.style.display="none",u.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(y("document.F=Object")),t.close(),t.F}();for(var t=i.length;t--;)delete d[s][i[t]];return d()};c[p]=!0,n.exports=Object.create||function(t,n){var e;return null!==t?(v[s]=r(t),e=new v,v[s]=null,e[p]=t):e=d(),void 0===n?e:o(e,n)}})),it=c((function(t,n){var e=et();n.exports=e("navigator","userAgent")||""})),ct=c((function(t,n){var e,r,o=a(),i=it(),c=o.process,u=c&&c.versions,f=u&&u.v8;f?r=(e=f.split("."))[0]<4?1:e[0]+e[1]:i&&((!(e=i.match(/Edge\/(\d+)/))||e[1]>=74)&&((e=i.match(/Chrome\/(\d+)/))&&(r=e[1]))),n.exports=r&&+r})),ut=c((function(t,n){var e=ct(),r=f();n.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))})),at=c((function(t,n){var e=ut();n.exports=e&&!Symbol.sham&&"symbol"==_typeof(Symbol.iterator)})),ft=c((function(t,n){var e=a(),r=V(),o=b(),i=H(),c=ut(),u=at(),f=r("wks"),s=e.Symbol,l=u?s:s&&s.withoutSetter||i;n.exports=function(t){return(!o(f,t)||!(c||"string"==typeof f[t]))&&(c&&o(s,t)?f[t]=s[t]:f[t]=l("Symbol."+t)),f[t]}})),st=c((function(t,n){n.exports={}})),lt=c((function(t,n){var e=ft(),r=st(),o=e("iterator"),i=Array.prototype;n.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}})),pt=c((function(t,n){var e={};e[ft()("toStringTag")]="z",n.exports="[object z]"===String(e)})),vt=c((function(t,n){var e=pt(),r=v(),o=ft()("toStringTag"),i="Arguments"==r(function(){return arguments}());n.exports=e?r:function(t){var n,e,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),o))?e:i?r(n):"Object"==(c=r(n))&&"function"==typeof n.callee?"Arguments":c}})),yt=c((function(t,n){var e=vt(),r=st(),o=ft()("iterator");n.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||r[e(t)]}})),dt=c((function(t,n){var e=P();n.exports=function(t){var n=t.return;if(void 0!==n)return e(n.call(t)).value}})),ht=c((function(t,n){var e=P(),r=lt(),o=K(),i=A(),c=yt(),u=dt(),a=function(t,n){this.stopped=t,this.result=n};n.exports=function(t,n,f){var s,l,p,v,y,d,h,g=f&&f.that,m=!(!f||!f.AS_ENTRIES),x=!(!f||!f.IS_ITERATOR),b=!(!f||!f.INTERRUPTED),w=i(n,g,1+m+b),S=function(t){return s&&u(s),new a(!0,t)},j=function(t){return m?(e(t),b?w(t[0],t[1],S):w(t[0],t[1])):b?w(t,S):w(t)};if(x)s=t;else{if("function"!=typeof(l=c(t)))throw TypeError("Target is not iterable");if(r(l)){for(p=0,v=o(t.length);v>p;p++)if((y=j(t[p]))&&y instanceof a)return y;return new a(!1)}s=l.call(t)}for(d=s.next;!(h=d.call(s)).done;){try{y=j(h.value)}catch(t){throw u(s),t}if("object"==_typeof(y)&&y&&y instanceof a)return y}return new a(!1)}})),gt=c((function(){"use strict";var t=I(),n=W(),e=q(),r=ot(),o=L(),i=p(),c=ht(),u=function t(r,i){var u=this;if(!(u instanceof t))return new t(r,i);e&&(u=e(new Error(void 0),n(u))),void 0!==i&&o(u,"message",String(i));var a=[];return c(r,a.push,{that:a}),o(u,"errors",a),u};u.prototype=r(Error.prototype,{constructor:i(5,u),message:i(5,""),name:i(5,"AggregateError")}),t({global:!0},{AggregateError:u})})),mt=c((function(){})),xt=c((function(t,n){var e=a();n.exports=e.Promise})),bt=c((function(t,n){var e=L();n.exports=function(t,n,r,o){o&&o.enumerable?t[n]=r:e(t,n,r)}})),wt=c((function(t,n){var e=bt();n.exports=function(t,n,r){for(var o in n)r&&r.unsafe&&t[o]?t[o]=n[o]:e(t,o,n[o],r);return t}})),St=c((function(t,n){"use strict";var e=pt(),r=vt();n.exports=e?{}.toString:function(){return"[object "+r(this)+"]"}})),jt=c((function(t,n){var e=pt(),r=E().f,o=L(),i=b(),c=St(),u=ft()("toStringTag");n.exports=function(t,n,a,f){if(t){var s=a?t:t.prototype;i(s,u)||r(s,u,{configurable:!0,value:n}),f&&!e&&o(s,"toString",c)}}})),Ot=c((function(t,n){"use strict";var e=et(),r=E(),o=ft(),i=s(),c=o("species");n.exports=function(t){var n=e(t),o=r.f;i&&n&&!n[c]&&o(n,c,{configurable:!0,get:function(){return this}})}})),Tt=c((function(t,n){n.exports=function(t,n,e){if(!(t instanceof n))throw TypeError("Incorrect "+(e?e+" ":"")+"invocation");return t}})),_t=c((function(t,n){var e=G(),r=Function.toString;"function"!=typeof e.inspectSource&&(e.inspectSource=function(t){return r.call(t)}),n.exports=e.inspectSource})),At=c((function(t,n){var e,r,o=ft()("iterator"),i=!1;try{e=0,(r={next:function(){return{done:!!e++}},return:function(){i=!0}})[o]=function(){return this},Array.from(r,(function(){throw 2}))}catch(t){}n.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var r={};r[o]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch(t){}return e}})),Pt=c((function(t,n){var e=P(),r=_(),o=ft()("species");n.exports=function(t,n){var i,c=e(t).constructor;return void 0===c||null==(i=e(c)[o])?n:r(i)}})),Et=c((function(t,n){var e=it();n.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(e)})),Lt=c((function(t,n){var e=v(),r=a();n.exports="process"==e(r.process)})),It=c((function(t,n){var e,r,o,i=a(),c=f(),u=A(),s=rt(),l=w(),p=Et(),v=Lt(),y=i.location,d=i.setImmediate,h=i.clearImmediate,g=i.process,m=i.MessageChannel,x=i.Dispatch,b=0,S={},j="onreadystatechange",O=function(t){if(S.hasOwnProperty(t)){var n=S[t];delete S[t],n()}},T=function(t){return function(){O(t)}},_=function(t){O(t.data)},P=function(t){i.postMessage(t+"",y.protocol+"//"+y.host)};(!d||!h)&&(d=function(t){for(var n=[],r=1;arguments.length>r;)n.push(arguments[r++]);return S[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,n)},e(b),b},h=function(t){delete S[t]},v?e=function(t){g.nextTick(T(t))}:x&&x.now?e=function(t){x.now(T(t))}:m&&!p?(o=(r=new m).port2,r.port1.onmessage=_,e=u(o.postMessage,o,1)):i.addEventListener&&"function"==typeof postMessage&&!i.importScripts&&y&&"file:"!==y.protocol&&!c(P)?(e=P,i.addEventListener("message",_,!1)):e=j in l("script")?function(t){s.appendChild(l("script"))[j]=function(){s.removeChild(this),O(t)}}:function(t){setTimeout(T(t),0)}),n.exports={set:d,clear:h}})),Mt=c((function(t,n){var e=it();n.exports=/web0s(?!.*chrome)/i.test(e)})),kt=c((function(t,n){var e,r,o,i,c,u,f,s,l=a(),p=j().f,v=It().set,y=Et(),d=Mt(),h=Lt(),g=l.MutationObserver||l.WebKitMutationObserver,m=l.document,x=l.process,b=l.Promise,w=p(l,"queueMicrotask"),S=w&&w.value;S||(e=function(){var t,n;for(h&&(t=x.domain)&&t.exit();r;){n=r.fn,r=r.next;try{n()}catch(t){throw r?i():o=void 0,t}}o=void 0,t&&t.enter()},y||h||d||!g||!m?b&&b.resolve?((f=b.resolve(void 0)).constructor=b,s=f.then,i=function(){s.call(f,e)}):i=h?function(){x.nextTick(e)}:function(){v.call(l,e)}:(c=!0,u=m.createTextNode(""),new g(e).observe(u,{characterData:!0}),i=function(){u.data=c=!c})),n.exports=S||function(t){var n={fn:t,next:void 0};o&&(o.next=n),r||(r=n,i()),o=n}})),Ct=c((function(t,n){"use strict";var e=_(),r=function(t){var n,r;this.promise=new t((function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e})),this.resolve=e(n),this.reject=e(r)};n.exports.f=function(t){return new r(t)}})),Rt=c((function(t,n){var e=P(),r=g(),o=Ct();n.exports=function(t,n){if(e(t),r(n)&&n.constructor===t)return n;var i=o.f(t);return(0,i.resolve)(n),i.promise}})),Ft=c((function(t,n){var e=a();n.exports=function(t,n){var r=e.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,n))}})),Dt=c((function(t,n){n.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}})),Nt=c((function(t,n){var e=a(),r=_t(),o=e.WeakMap;n.exports="function"==typeof o&&/native code/.test(r(o))})),Gt=c((function(t,n){var e,r,o,i,c,u,f,s,l=Nt(),p=a(),v=g(),y=L(),d=b(),h=G(),m=z(),x=J(),w="Object already initialized",S=p.WeakMap;l||h.state?(i=h.state||(h.state=new S),c=i.get,u=i.has,f=i.set,e=function(t,n){if(u.call(i,t))throw new TypeError(w);return n.facade=t,f.call(i,t,n),n},r=function(t){return c.call(i,t)||{}},o=function(t){return u.call(i,t)}):(x[s=m("state")]=!0,e=function(t,n){if(d(t,s))throw new TypeError(w);return n.facade=t,y(t,s,n),n},r=function(t){return d(t,s)?t[s]:{}},o=function(t){return d(t,s)}),n.exports={set:e,get:r,has:o,enforce:function(t){return o(t)?r(t):e(t,{})},getterFor:function(t){return function(n){var e;if(!v(n)||(e=r(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return e}}}})),Vt=c((function(t,n){n.exports="object"==("undefined"==typeof window?"undefined":_typeof(window))})),Ht=c((function(){"use strict";var t,n,e,r,o=I(),i=D(),c=a(),u=et(),f=xt(),s=bt(),l=wt(),p=q(),v=jt(),y=Ot(),d=g(),h=_(),m=Tt(),x=_t(),b=ht(),w=At(),S=Pt(),j=It().set,T=kt(),A=Rt(),P=Ft(),E=Ct(),L=Dt(),M=Gt(),k=O(),C=ft(),R=Vt(),F=Lt(),N=ct(),G=C("species"),V="Promise",H=M.get,z=M.set,U=M.getterFor(V),W=f&&f.prototype,B=f,Y=W,K=c.TypeError,X=c.document,$=c.process,J=E.f,Q=J,Z=!!(X&&X.createEvent&&c.dispatchEvent),tt="function"==typeof PromiseRejectionEvent,nt="unhandledrejection",rt=!1,ot=k(V,(function(){var t=x(B),n=t!==String(B);if(!n&&66===N||i&&!Y.finally)return!0;if(N>=51&&/native code/.test(t))return!1;var e=new B((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(e.constructor={})[G]=r,!(rt=e.then((function(){}))instanceof r)||!n&&R&&!tt})),it=ot||!w((function(t){B.all(t).catch((function(){}))})),ut=function(t){var n;return!(!d(t)||"function"!=typeof(n=t.then))&&n},at=function(t,n){if(!t.notified){t.notified=!0;var e=t.reactions;T((function(){for(var r=t.value,o=1==t.state,i=0;e.length>i;){var c,u,a,f=e[i++],s=o?f.ok:f.fail,l=f.resolve,p=f.reject,v=f.domain;try{s?(o||(2===t.rejection&&vt(t),t.rejection=1),!0===s?c=r:(v&&v.enter(),c=s(r),v&&(v.exit(),a=!0)),c===f.promise?p(K("Promise-chain cycle")):(u=ut(c))?u.call(c,l,p):l(c)):p(r)}catch(t){v&&!a&&v.exit(),p(t)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&lt(t)}))}},st=function(t,n,e){var r,o;Z?((r=X.createEvent("Event")).promise=n,r.reason=e,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:n,reason:e},!tt&&(o=c["on"+t])?o(r):t===nt&&P("Unhandled promise rejection",e)},lt=function(t){j.call(c,(function(){var n,e=t.facade,r=t.value;if(pt(t)&&(n=L((function(){F?$.emit("unhandledRejection",r,e):st(nt,e,r)})),t.rejection=F||pt(t)?2:1,n.error))throw n.value}))},pt=function(t){return 1!==t.rejection&&!t.parent},vt=function(t){j.call(c,(function(){var n=t.facade;F?$.emit("rejectionHandled",n):st("rejectionhandled",n,t.value)}))},yt=function(t,n,e){return function(r){t(n,r,e)}},dt=function(t,n,e){t.done||(t.done=!0,e&&(t=e),t.value=n,t.state=2,at(t,!0))},gt=function t(n,e,r){if(!n.done){n.done=!0,r&&(n=r);try{if(n.facade===e)throw K("Promise can't be resolved itself");var o=ut(e);o?T((function(){var r={done:!1};try{o.call(e,yt(t,r,n),yt(dt,r,n))}catch(t){dt(r,t,n)}})):(n.value=e,n.state=1,at(n,!1))}catch(t){dt({done:!1},t,n)}}};if(ot&&(Y=(B=function(n){m(this,B,V),h(n),t.call(this);var e=H(this);try{n(yt(gt,e),yt(dt,e))}catch(t){dt(e,t)}}).prototype,(t=function(t){z(this,{type:V,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=l(Y,{then:function(t,n){var e=U(this),r=J(S(this,B));return r.ok="function"!=typeof t||t,r.fail="function"==typeof n&&n,r.domain=F?$.domain:void 0,e.parent=!0,e.reactions.push(r),0!=e.state&&at(e,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),n=function(){var n=new t,e=H(n);this.promise=n,this.resolve=yt(gt,e),this.reject=yt(dt,e)},E.f=J=function(t){return t===B||t===e?new n(t):Q(t)},!i&&"function"==typeof f&&W!==Object.prototype)){r=W.then,rt||(s(W,"then",(function(t,n){var e=this;return new B((function(t,n){r.call(e,t,n)})).then(t,n)}),{unsafe:!0}),s(W,"catch",Y.catch,{unsafe:!0}));try{delete W.constructor}catch(t){}p&&p(W,Y)}o({global:!0,wrap:!0,forced:ot},{Promise:B}),v(B,V,!1,!0),y(V),e=u(V),o({target:V,stat:!0,forced:ot},{reject:function(t){var n=J(this);return n.reject.call(void 0,t),n.promise}}),o({target:V,stat:!0,forced:i||ot},{resolve:function(t){return A(i&&this===e?B:this,t)}}),o({target:V,stat:!0,forced:it},{all:function(t){var n=this,e=J(n),r=e.resolve,o=e.reject,i=L((function(){var e=h(n.resolve),i=[],c=0,u=1;b(t,(function(t){var a=c++,f=!1;i.push(void 0),u++,e.call(n,t).then((function(t){f||(f=!0,i[a]=t,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),e.promise},race:function(t){var n=this,e=J(n),r=e.reject,o=L((function(){var o=h(n.resolve);b(t,(function(t){o.call(n,t).then(e.resolve,r)}))}));return o.error&&r(o.value),e.promise}})})),zt=c((function(){"use strict";var t=I(),n=_(),e=Ct(),r=Dt(),o=ht();t({target:"Promise",stat:!0},{allSettled:function(t){var i=this,c=e.f(i),u=c.resolve,a=c.reject,f=r((function(){var e=n(i.resolve),r=[],c=0,a=1;o(t,(function(t){var n=c++,o=!1;r.push(void 0),a++,e.call(i,t).then((function(t){o||(o=!0,r[n]={status:"fulfilled",value:t},--a||u(r))}),(function(t){o||(o=!0,r[n]={status:"rejected",reason:t},--a||u(r))}))})),--a||u(r)}));return f.error&&a(f.value),c.promise}})})),Ut=c((function(){"use strict";var t=I(),n=_(),e=et(),r=Ct(),o=Dt(),i=ht(),c="No one promise resolved";t({target:"Promise",stat:!0},{any:function(t){var u=this,a=r.f(u),f=a.resolve,s=a.reject,l=o((function(){var r=n(u.resolve),o=[],a=0,l=1,p=!1;i(t,(function(t){var n=a++,i=!1;o.push(void 0),l++,r.call(u,t).then((function(t){i||p||(p=!0,f(t))}),(function(t){i||p||(i=!0,o[n]=t,--l||s(new(e("AggregateError"))(o,c)))}))})),--l||s(new(e("AggregateError"))(o,c))}));return l.error&&s(l.value),a.promise}})})),Wt=c((function(){"use strict";var t,n=I(),e=D(),r=xt(),o=f(),i=et(),c=Pt(),u=Rt(),a=bt();n({target:"Promise",proto:!0,real:!0,forced:!!r&&o((function(){r.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var n=c(this,i("Promise")),e="function"==typeof t;return this.then(e?function(e){return u(n,t()).then((function(){return e}))}:t,e?function(e){return u(n,t()).then((function(){throw e}))}:t)}}),!e&&"function"==typeof r&&(t=i("Promise").prototype.finally,r.prototype.finally!==t&&a(r.prototype,"finally",t,{unsafe:!0}))})),Bt=c((function(t,n){var e=Y(),r=d(),o=function(t){return function(n,o){var i,c,u=String(r(n)),a=e(o),f=u.length;return a<0||a>=f?t?"":void 0:(i=u.charCodeAt(a))<55296||i>56319||a+1===f||(c=u.charCodeAt(a+1))<56320||c>57343?t?u.charAt(a):i:t?u.slice(a,a+2):c-56320+(i-55296<<10)+65536}};n.exports={codeAt:o(!1),charAt:o(!0)}})),qt=c((function(t,n){"use strict";var e,r,o,i=f(),c=W(),u=L(),a=b(),s=ft(),l=D(),p=s("iterator"),v=!1;[].keys&&("next"in(o=[].keys())?(r=c(c(o)))!==Object.prototype&&(e=r):v=!0);var y=null==e||i((function(){var t={};return e[p].call(t)!==t}));y&&(e={}),(!l||y)&&!a(e,p)&&u(e,p,(function(){return this})),n.exports={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:v}})),Yt=c((function(t,n){"use strict";var e=qt().IteratorPrototype,r=ot(),o=p(),i=jt(),c=st(),u=function(){return this};n.exports=function(t,n,a){var f=n+" Iterator";return t.prototype=r(e,{next:o(1,a)}),i(t,f,!1,!0),c[f]=u,t}})),Kt=c((function(t,n){"use strict";var e=I(),r=Yt(),o=W(),i=q(),c=jt(),u=L(),a=bt(),f=ft(),s=D(),l=st(),p=qt(),v=p.IteratorPrototype,y=p.BUGGY_SAFARI_ITERATORS,d=f("iterator"),h="keys",g="values",m="entries",x=function(){return this};n.exports=function(t,n,f,p,b,w,S){r(f,n,p);var j,O,T,_=function(t){if(t===b&&I)return I;if(!y&&t in E)return E[t];switch(t){case h:case g:case m:return function(){return new f(this,t)}}return function(){return new f(this)}},A=n+" Iterator",P=!1,E=t.prototype,L=E[d]||E["@@iterator"]||b&&E[b],I=!y&&L||_(b),M="Array"==n&&E.entries||L;if(M&&(j=o(M.call(new t)),v!==Object.prototype&&j.next&&(!s&&o(j)!==v&&(i?i(j,v):"function"!=typeof j[d]&&u(j,d,x)),c(j,A,!0,!0),s&&(l[A]=x))),b==g&&L&&L.name!==g&&(P=!0,I=function(){return L.call(this)}),(!s||S)&&E[d]!==I&&u(E,d,I),l[n]=I,b)if(O={values:_(g),keys:w?I:_(h),entries:_(m)},S)for(T in O)(y||P||!(T in E))&&a(E,T,O[T]);else e({target:n,proto:!0,forced:y||P},O);return O}})),Xt=c((function(){"use strict";var t=Bt().charAt,n=Gt(),e=Kt(),r="String Iterator",o=n.set,i=n.getterFor(r);e(String,"String",(function(t){o(this,{type:r,string:String(t),index:0})}),(function(){var n,e=i(this),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(n=t(r,o),e.index+=n.length,{value:n,done:!1})}))})),$t=c((function(t,n){n.exports=function(){}})),Jt=c((function(t,n){"use strict";var e=h(),r=$t(),o=st(),i=Gt(),c=Kt(),u="Array Iterator",a=i.set,f=i.getterFor(u);n.exports=c(Array,"Array",(function(t,n){a(this,{type:u,target:e(t),index:0,kind:n})}),(function(){var t=f(this),n=t.target,e=t.kind,r=t.index++;return!n||r>=n.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==e?{value:r,done:!1}:"values"==e?{value:n[r],done:!1}:{value:[r,n[r]],done:!1}}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")})),Qt=c((function(t,n){n.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}})),Zt=c((function(){Jt();var t,n,e=Qt(),r=a(),o=vt(),i=L(),c=st(),u=ft()("toStringTag");for(var f in e)(n=(t=r[f])&&t.prototype)&&o(n)!==u&&i(n,u,f),c[f]=c.Array})),tn=c((function(t,n){gt(),mt(),Ht(),zt(),Ut(),Wt(),Xt(),Zt();var e=T();n.exports=e.Promise})),nn=c((function(t,n){var e=tn();n.exports=e})),en=c((function(t,n){n.exports=nn()})),rn=u(F()),on=u(en());var cn=function(){var t={};return t.promise=new on.default((function(n,e){t.resolve=n,t.reject=e})),t},un=void 0===rn.default?0:rn.default;un&&(un.createDeferred=cn)}();
{
"name": "p-defer-es5",
"version": "2.0.0-master.10e6578",
"version": "2.0.0-master.22dbfae",
"description": "",
"engines": {
"node": ">= 12.2.0"
},
"files": [
"babel.config.cjs.json",
"babel.config.commonjs.json",
"babel.config.esm.json",
"dist/**/*",
"scripts/**/*",
"src/**/*"

@@ -14,7 +18,13 @@ ],

"scripts": {
"build:cjs": "esbuild ./src/index.js --bundle --format=cjs | babel --config-file ./babel.config.cjs.json --filename index.js --out-file lib/index.js",
"build:esm": "esbuild ./src/index.js --bundle --format=esm | babel --config-file ./babel.config.esm.json --filename index.mjs --out-file lib/esm/index.mjs",
"build:umd": "mkdir dist && esbuild ./src/polyfill.js --bundle --format=iife | babel --config-file ./babel.config.esm.json --filename polyfill.js | terser --compress --mangle --output dist/p-defer-es5.production.min.js",
"postinstall": "npm run build:cjs && npm run build:esm",
"prepublishOnly": "npm run build:umd",
"postinstall:commonjs:bundle": "node ./scripts/esbuild.mjs p-defer ./src/index.js cjs ./lib/index.bundled.js",
"postinstall:commonjs:transpile": "babel ./lib/index.bundled.js --config-file ./babel.config.commonjs.json --out-file ./lib/index.js",
"postinstall:commonjs": "npm run postinstall:commonjs:bundle && npm run postinstall:commonjs:transpile",
"postinstall:esm:bundle": "node ./scripts/esbuild.mjs p-defer ./src/index.mjs esm lib/esm/index.bundled.mjs",
"postinstall:esm:transpile": "babel ./lib/esm/index.bundled.mjs --config-file ./babel.config.esm.json --out-file ./lib/esm/index.mjs",
"postinstall:esm": "npm run postinstall:esm:bundle && npm run postinstall:esm:transpile",
"postinstall": "npm run postinstall:commonjs && npm run postinstall:esm",
"prepublishOnly:global:bundle": "esbuild ./src/global.mjs --bundle --format=iife --minify --outfile=./lib/esm/global.bundled.mjs",
"prepublishOnly:global:transpile": "babel ./lib/esm/global.bundled.mjs --config-file ./babel.config.global.json | terser --compress --mangle --output ./dist/p-defer-es5.production.min.js",
"prepublishOnly:global": "mkdirp ./dist && npm run prepublishOnly:global:bundle && npm run prepublishOnly:global:transpile",
"prepublishOnly": "npm run prepublishOnly:global",
"pretest": "npm run prepublishOnly",

@@ -29,2 +39,3 @@ "test": "jest"

"defer",
"deferred",
"p-defer",

@@ -40,15 +51,18 @@ "promise"

"dependencies": {
"@babel/cli": "7.14.5",
"@babel/core": "7.14.6",
"@babel/preset-env": "7.14.7",
"esbuild": "0.12.15",
"terser": "5.7.1"
"@babel/cli": "^7.14.5",
"@babel/core": "^7.14.6",
"@babel/plugin-transform-runtime": "^7.14.5",
"@babel/preset-env": "^7.14.7",
"@babel/runtime-corejs3": "^7.14.7",
"esbuild": "^0.12.15",
"mkdirp": "^1.0.4",
"read-pkg-up": "^8.0.0",
"terser": "^5.7.1"
},
"devDependencies": {
"jest": "^27.0.6",
"p-defer": "^4.0.0"
},
"peerDependencies": {
"p-defer": "*"
"p-defer": ">= 4.0.0"
}
}
import createDeferred from 'p-defer';
export default createDeferred;
module.exports = createDeferred;
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