Comparing version 0.19.3 to 1.0.0
@@ -13,3 +13,3 @@ !function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)e.d(r,o,function(t){return n[t]}.bind(null,o));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=80)}({2: | ||
/*! all exports used */ | ||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(n,t,e){(function(t){!function(){"use strict";var e,r,o,i=null,u="object"==typeof self,c=u?self:t,f=c.Promise,s=c.process,a=c.console,l=!1,h=Array,v=Error,p=1,d=2,_=3,y="Symbol",m="iterator",j="species",w=y+"("+j+")",b="return",g="_uh",x="_pt",k="_st",S="Invalid argument",P="\nFrom previous ",T="Chaining cycle detected for promise",O="rejectionHandled",R="unhandledRejection",C={e:i},F=function(){},M=/^.+\/node_modules\/yaku\/.+\n?/gm,E=function(n){var t;if(!I(this)||this._s!==e)throw B("Invalid this");if(this._s=_,l&&(this[x]=D()),n!==F){if(!L(n))throw B(S);(t=$(n)(V(this,d),V(this,p)))===C&&Z(this,p,t.e)}};function H(){return E[y][j]||w}function I(n){return n&&"object"==typeof n}function L(n){return"function"==typeof n}function A(n,t){return n instanceof t}function U(n,t,e){if(!t(n))throw B(e)}function Y(){try{return r.apply(o,arguments)}catch(n){return C.e=n,C}}function $(n,t){return r=n,o=t,Y}function q(n,t){var r=h(n),o=0;function i(){for(var i=0;i<o;)t(r[i],r[i+1]),r[i++]=e,r[i++]=e;o=0,r.length>n&&(r.length=n)}return function(n,t){r[o++]=n,r[o++]=t,2===o&&E.nextTick(i)}}function z(n,t){var e,r,o,i,u=0;if(!n)throw B(S);var c=n[E[y][m]];if(L(c))r=c.call(n);else{if(!L(n.next)){if(A(n,h)){for(e=n.length;u<e;)t(n[u],u++);return u}throw B(S)}r=n}for(;!(o=r.next()).done;)if((i=$(t)(o.value,u++))===C)throw L(r[b])&&r[b](),i.e;return u}function B(n){return new TypeError(n)}function D(n){return(n?"":P)+(new v).stack}E.default=E,function(n,t){for(var e in t)n[e]=t[e]}(E.prototype,{then:function(n,t){if(void 0===this._s)throw B();return function(n,t,e,r){L(e)&&(t._onFulfilled=e);L(r)&&(n[g]&&K(O,n),t._onRejected=r);l&&(t._p=n);n[n._c++]=t,n._s!==_&&G(n,t);return t}(this,Q(E.speciesConstructor(this,E)),n,t)},catch:function(n){return this.then(e,n)},finally:function(n){return this.then(function(t){return E.resolve(n()).then(function(){return t})},function(t){return E.resolve(n()).then(function(){throw t})})},_c:0,_p:i}),E.resolve=function(n){return N(n)?n:nn(Q(this),n)},E.reject=function(n){return Z(Q(this),p,n)},E.race=function(n){var t=this,e=Q(t),r=function(n){Z(e,d,n)},o=function(n){Z(e,p,n)},i=$(z)(n,function(n){t.resolve(n).then(r,o)});return i===C?t.reject(i.e):e},E.all=function(n){var t,e=this,r=Q(e),o=[];function i(n){Z(r,p,n)}return(t=$(z)(n,function(n,u){e.resolve(n).then(function(n){o[u]=n,--t||Z(r,d,o)},i)}))===C?e.reject(t.e):(t||Z(r,d,[]),r)},E.Symbol=c[y]||{},$(function(){Object.defineProperty(E,H(),{get:function(){return this}})})(),E.speciesConstructor=function(n,t){var e=n.constructor;return e&&e[H()]||t},E.unhandledRejection=function(n,t){a&&a.error("Uncaught (in promise)",l?t.longStack:W(n,t))},E.rejectionHandled=F,E.enableLongStackTrace=function(){l=!0},E.nextTick=u?function(n){f?new f(function(n){n()}).then(n):setTimeout(n)}:s.nextTick,E._s=1;var G=q(999,function(n,t){var r,o;(o=n._s!==p?t._onFulfilled:t._onRejected)!==e?(r=$(X)(o,n._v))!==C?nn(t,r):Z(t,p,r.e):Z(t,n._s,n._v)}),J=q(9,function(n){(function n(t){if(t._umark)return!0;t._umark=!0;var e,r=0,o=t._c;for(;r<o;)if((e=t[r++])._onRejected||n(e))return!0})(n)||(n[g]=1,K(R,n))});function K(n,t){var e="on"+n.toLowerCase(),r=c[e];s&&s.listeners(n).length?n===R?s.emit(n,t._v,t):s.emit(n,t):r?r({reason:t._v,promise:t}):E[n](t._v,t)}function N(n){return n&&n._s}function Q(n){return N(n)?new n(F):(t=new n(function(n,o){if(t)throw B();e=n,r=o}),U(e,L),U(r,L),t);var t,e,r}function V(n,t){var e=!1;return function(r){e||(e=!0,l&&(n[k]=D(!0)),t===d?nn(n,r):Z(n,t,r))}}function W(n,t){var e=[];function r(n){return e.push(n.replace(/^\s+|\s+$/g,""))}return l&&(t[k]&&r(t[k]),function n(t){t&&x in t&&(n(t._next),r(t[x]+""),n(t._p))}(t)),(n&&n.stack?n.stack:n)+("\n"+e.join("\n")).replace(M,"")}function X(n,t){return n(t)}function Z(n,t,e){var r=0,o=n._c;if(n._s===_)for(n._s=t,n._v=e,t===p&&(l&&function(n){return A(n,v)}(e)&&(e.longStack=W(e,n)),J(n));r<o;)G(n,n[r++]);return n}function nn(n,t){if(t===n&&t)return Z(n,p,B(T)),n;if(t!==i&&(L(t)||I(t))){var e=$(tn)(t);if(e===C)return Z(n,p,e.e),n;L(e)?(l&&N(t)&&(n._next=t),N(t)?en(n,t,e):E.nextTick(function(){en(n,t,e)})):Z(n,d,t)}else Z(n,d,t);return n}function tn(n){return n.then}function en(n,t,e){var r=$(e,t)(function(e){t&&(t=i,nn(n,e))},function(e){t&&(t=i,Z(n,p,e))});r===C&&t&&(Z(n,p,r.e),t=i)}try{n.exports=E}catch(n){c.Yaku=E}}()}).call(this,e(/*! ./../node_modules/webpack/buildin/global.js */2))},80: | ||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(n,t,e){(function(t){!function(){"use strict";var e,r,o,i=null,u="object"==typeof self,c=u?self:t,f=c.Promise,s=c.process,a=c.console,l=!1,h=Array,v=Error,d=1,p=2,_=3,y="Symbol",j="iterator",m="species",w=y+"("+m+")",b="return",g="_uh",x="_pt",k="_st",S="Invalid argument",P="\nFrom previous ",T="Chaining cycle detected for promise",O="rejectionHandled",R="unhandledRejection",C={e:i},F=function(){},M=/^.+\/node_modules\/yaku\/.+\n?/gm,E=function(n){var t;if(!I(this)||this._s!==e)throw B("Invalid this");if(this._s=_,l&&(this[x]=D()),n!==F){if(!L(n))throw B(S);(t=$(n)(V(this,p),V(this,d)))===C&&Z(this,d,t.e)}};function H(){return E[y][m]||w}function I(n){return n&&"object"==typeof n}function L(n){return"function"==typeof n}function A(n,t){return n instanceof t}function U(n,t,e){if(!t(n))throw B(e)}function Y(){try{return r.apply(o,arguments)}catch(n){return C.e=n,C}}function $(n,t){return r=n,o=t,Y}function q(n,t){var r=h(n),o=0;function i(){for(var i=0;i<o;)t(r[i],r[i+1]),r[i++]=e,r[i++]=e;o=0,r.length>n&&(r.length=n)}return function(n,t){r[o++]=n,r[o++]=t,2===o&&E.nextTick(i)}}function z(n,t){var e,r,o,i,u=0;if(!n)throw B(S);var c=n[E[y][j]];if(L(c))r=c.call(n);else{if(!L(n.next)){if(A(n,h)){for(e=n.length;u<e;)t(n[u],u++);return u}throw B(S)}r=n}for(;!(o=r.next()).done;)if((i=$(t)(o.value,u++))===C)throw L(r[b])&&r[b](),i.e;return u}function B(n){return new TypeError(n)}function D(n){return(n?"":P)+(new v).stack}E.default=E,function(n,t){for(var e in t)n[e]=t[e]}(E.prototype,{then:function(n,t){if(void 0===this._s)throw B();return function(n,t,e,r){L(e)&&(t._onFulfilled=e);L(r)&&(n[g]&&K(O,n),t._onRejected=r);l&&(t._p=n);n[n._c++]=t,n._s!==_&&G(n,t);return t}(this,Q(E.speciesConstructor(this,E)),n,t)},catch:function(n){return this.then(e,n)},finally:function(n){return this.then(function(t){return E.resolve(n()).then(function(){return t})},function(t){return E.resolve(n()).then(function(){throw t})})},_c:0,_p:i}),E.resolve=function(n){return N(n)?n:nn(Q(this),n)},E.reject=function(n){return Z(Q(this),d,n)},E.race=function(n){var t=this,e=Q(t),r=function(n){Z(e,p,n)},o=function(n){Z(e,d,n)},i=$(z)(n,function(n){t.resolve(n).then(r,o)});return i===C?t.reject(i.e):e},E.all=function(n){var t,e=this,r=Q(e),o=[];function i(n){Z(r,d,n)}return(t=$(z)(n,function(n,u){e.resolve(n).then(function(n){o[u]=n,--t||Z(r,p,o)},i)}))===C?e.reject(t.e):(t||Z(r,p,[]),r)},E.allSettled=function(n){var t,e=this,r=Q(e),o=[];return(t=$(z)(n,function(n,i){e.resolve(n).then(function(n){o[i]={status:"fulfilled",value:n},--t||Z(r,p,o)},function(n){o[i]={status:"rejected",reason:n},--t||Z(r,p,o)})}))===C?e.reject(t.e):(t||Z(r,p,[]),r)},E.Symbol=c[y]||{},$(function(){Object.defineProperty(E,H(),{get:function(){return this}})})(),E.speciesConstructor=function(n,t){var e=n.constructor;return e&&e[H()]||t},E.unhandledRejection=function(n,t){a&&a.error("Uncaught (in promise)",l?t.longStack:W(n,t))},E.rejectionHandled=F,E.enableLongStackTrace=function(){l=!0},E.nextTick=u?function(n){f?new f(function(n){n()}).then(n):setTimeout(n)}:s.nextTick,E._s=1;var G=q(999,function(n,t){var r,o;(o=n._s!==d?t._onFulfilled:t._onRejected)!==e?(r=$(X)(o,n._v))!==C?nn(t,r):Z(t,d,r.e):Z(t,n._s,n._v)}),J=q(9,function(n){(function n(t){if(t._umark)return!0;t._umark=!0;var e,r=0,o=t._c;for(;r<o;)if((e=t[r++])._onRejected||n(e))return!0})(n)||(n[g]=1,K(R,n))});function K(n,t){var e="on"+n.toLowerCase(),r=c[e];s&&s.listeners(n).length?n===R?s.emit(n,t._v,t):s.emit(n,t):r?r({reason:t._v,promise:t}):E[n](t._v,t)}function N(n){return n&&n._s}function Q(n){return N(n)?new n(F):(t=new n(function(n,o){if(t)throw B();e=n,r=o}),U(e,L),U(r,L),t);var t,e,r}function V(n,t){var e=!1;return function(r){e||(e=!0,l&&(n[k]=D(!0)),t===p?nn(n,r):Z(n,t,r))}}function W(n,t){var e=[];function r(n){return e.push(n.replace(/^\s+|\s+$/g,""))}return l&&(t[k]&&r(t[k]),function n(t){t&&x in t&&(n(t._next),r(t[x]+""),n(t._p))}(t)),(n&&n.stack?n.stack:n)+("\n"+e.join("\n")).replace(M,"")}function X(n,t){return n(t)}function Z(n,t,e){var r=0,o=n._c;if(n._s===_)for(n._s=t,n._v=e,t===d&&(l&&function(n){return A(n,v)}(e)&&(e.longStack=W(e,n)),J(n));r<o;)G(n,n[r++]);return n}function nn(n,t){if(t===n&&t)return Z(n,d,B(T)),n;if(t!==i&&(L(t)||I(t))){var e=$(tn)(t);if(e===C)return Z(n,d,e.e),n;L(e)?(l&&N(t)&&(n._next=t),N(t)?en(n,t,e):E.nextTick(function(){en(n,t,e)})):Z(n,p,t)}else Z(n,p,t);return n}function tn(n){return n.then}function en(n,t,e){var r=$(e,t)(function(e){t&&(t=i,nn(n,e))},function(e){t&&(t=i,Z(n,d,e))});r===C&&t&&(Z(n,d,r.e),t=i)}try{n.exports=E}catch(n){c.Yaku=E}}()}).call(this,e(/*! ./../node_modules/webpack/buildin/global.js */2))},80: | ||
/*!***********************!*\ | ||
@@ -16,0 +16,0 @@ !*** ./src/global.js ***! |
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var i,e,r,o=null,n="object"==typeof self,u=n?self:global,t=u.Promise,f=u.process,c=Array,s=0,a=1,h=2,l="Symbol",v="species",_="return",p="Invalid argument",d="Chaining cycle detected for promise",w="unhandledRejection",y={e:o},m=function(){},j=u[l]||{},g=n?function(n){t?new t(function(n){n()}).then(n):setTimeout(n)}:f.nextTick,k=function(n){var t,e=this;if(!C(e)||e._s!==i)throw P("Invalid this");if(e._s=h,n!==m){if(!x(n))throw P(p);(t=T(n)(O(e,a),O(e,s)))===y&&z(e,s,t.e)}};function b(){return j[v]||"Symbol(species)"}function C(n){return n&&"object"==typeof n}function x(n){return"function"==typeof n}function R(n,t,e){if(!t(n))throw P(e)}function Y(){try{return e.apply(r,arguments)}catch(n){return y.e=n,y}}function T(n,t){return e=n,r=t,Y}function F(t,e){var r=c(t),o=0;function u(){for(var n=0;n<o;)e(r[n],r[n+1]),r[n++]=i,r[n++]=i;o=0,r.length>t&&(r.length=t)}return function(n,t){r[o++]=n,r[o++]=t,2===o&&g(u)}}function I(n,t){var e,r,o,u,i=0;if(!n)throw P(p);var f=n[j.iterator];if(x(f))r=f.call(n);else{if(!x(n.next)){if(n instanceof c){for(e=n.length;i<e;)t(n[i],i++);return i}throw P(p)}r=n}for(;!(o=r.next()).done;)if((u=T(t)(o.value,i++))===y)throw x(r[_])&&r[_](),u.e;return i}function P(n){return new TypeError(n)}(function(n,t){for(var e in t)n.prototype[e]=t[e]})(k.default=k,{then:function(n,t){if(void 0===this._s)throw P();return function(n,t,e,r){x(e)&&(t._onFulfilled=e);x(r)&&(n._uh&&E("rejectionHandled",n),t._onRejected=r);n[n._pCount++]=t,n._s!==h&&S(n,t);return t}(this,L((e=k,(r=this.constructor)&&r[b()]||e)),n,t);var e,r},catch:function(n){return this.then(i,n)},finally:function(t){return this.then(function(n){return k.resolve(t()).then(function(){return n})},function(n){return k.resolve(t()).then(function(){throw n})})},_pCount:0,_pre:o,_Yaku:1}),k.resolve=function(n){return H(n)?n:B(L(this),n)},k.reject=function(n){return z(L(this),s,n)},k.race=function(n){var t=this,e=L(t),r=function(n){z(e,a,n)},o=function(n){z(e,s,n)},u=T(I)(n,function(n){t.resolve(n).then(r,o)});return u===y?t.reject(u.e):e},k.all=function(n){var e,r=this,o=L(r),u=[];function i(n){z(o,s,n)}return(e=T(I)(n,function(n,t){r.resolve(n).then(function(n){u[t]=n,--e||z(o,a,u)},i)}))===y?r.reject(e.e):(e||z(o,a,[]),o)},T(function(){Object.defineProperty(k,b(),{get:function(){return this}})})(),k._Yaku=1;var S=F(999,function(n,t){var e,r;(r=n._s?t._onFulfilled:t._onRejected)!==i?(e=T(q)(r,n._v))!==y?B(t,e):z(t,s,e.e):z(t,n._s,n._v)}),A=F(9,function(n){(function n(t){{if(t._umark)return!0;t._umark=!0}var e,r=0,o=t._pCount;for(;r<o;)if((e=t[r++])._onRejected||n(e))return!0})(n)||(n._uh=1,E(w,n))});function E(n,t){var e="on"+n.toLowerCase(),r=u[e];f&&f.listeners(n).length?n===w?f.emit(n,t._v,t):f.emit(n,t):r&&r({reason:t._v,promise:t})}function H(n){return n&&n._Yaku}function L(n){return H(n)?new n(m):(e=new n(function(n,t){if(e)throw P();r=n,o=t}),R(r,x),R(o,x),e);var e,r,o}function O(t,e){var r=!1;return function(n){r||(r=!0,e===a?B(t,n):z(t,e,n))}}function q(n,t){return n(t)}function z(n,t,e){var r=0,o=n._pCount;if(n._s===h)for(n._s=t,n._v=e,t===s&&A(n);r<o;)S(n,n[r++]);return n}function B(n,t){if(t===n&&t)return z(n,s,P(d)),n;if(t!==o&&(x(t)||C(t))){var e=T(D)(t);if(e===y)return z(n,s,e.e),n;x(e)?H(t)?G(n,t,e):g(function(){G(n,t,e)}):z(n,a,t)}else z(n,a,t);return n}function D(n){return n.then}function G(t,e,n){var r=T(n,e)(function(n){e&&(e=o,B(t,n))},function(n){e&&(e=o,z(t,s,n))});r===y&&e&&(z(t,s,r.e),e=o)}try{module.exports=k}catch(n){u.Yaku=k}}(); | ||
!function(){"use strict";var i,e,r,o=null,n="object"==typeof self,u=n?self:global,t=u.Promise,f=u.process,c=Array,s=0,a=1,l=2,h="Symbol",v="species",_="return",d="Invalid argument",p="Chaining cycle detected for promise",w="unhandledRejection",y={e:o},j=function(){},m=u[h]||{},g=n?function(n){t?new t(function(n){n()}).then(n):setTimeout(n)}:f.nextTick,k=function(n){var t,e=this;if(!C(e)||e._s!==i)throw I("Invalid this");if(e._s=l,n!==j){if(!x(n))throw I(d);(t=S(n)(O(e,a),O(e,s)))===y&&z(e,s,t.e)}};function b(){return m[v]||"Symbol(species)"}function C(n){return n&&"object"==typeof n}function x(n){return"function"==typeof n}function R(n,t,e){if(!t(n))throw I(e)}function Y(){try{return e.apply(r,arguments)}catch(n){return y.e=n,y}}function S(n,t){return e=n,r=t,Y}function T(t,e){var r=c(t),o=0;function u(){for(var n=0;n<o;)e(r[n],r[n+1]),r[n++]=i,r[n++]=i;o=0,r.length>t&&(r.length=t)}return function(n,t){r[o++]=n,r[o++]=t,2===o&&g(u)}}function F(n,t){var e,r,o,u,i=0;if(!n)throw I(d);var f=n[m.iterator];if(x(f))r=f.call(n);else{if(!x(n.next)){if(n instanceof c){for(e=n.length;i<e;)t(n[i],i++);return i}throw I(d)}r=n}for(;!(o=r.next()).done;)if((u=S(t)(o.value,i++))===y)throw x(r[_])&&r[_](),u.e;return i}function I(n){return new TypeError(n)}(function(n,t){for(var e in t)n.prototype[e]=t[e]})(k.default=k,{then:function(n,t){if(void 0===this._s)throw I();return function(n,t,e,r){x(e)&&(t._onFulfilled=e);x(r)&&(n._uh&&E("rejectionHandled",n),t._onRejected=r);n[n._pCount++]=t,n._s!==l&&P(n,t);return t}(this,L((e=k,(r=this.constructor)&&r[b()]||e)),n,t);var e,r},catch:function(n){return this.then(i,n)},finally:function(t){return this.then(function(n){return k.resolve(t()).then(function(){return n})},function(n){return k.resolve(t()).then(function(){throw n})})},_pCount:0,_pre:o,_Yaku:1}),k.resolve=function(n){return H(n)?n:B(L(this),n)},k.reject=function(n){return z(L(this),s,n)},k.race=function(n){var t=this,e=L(t),r=function(n){z(e,a,n)},o=function(n){z(e,s,n)},u=S(F)(n,function(n){t.resolve(n).then(r,o)});return u===y?t.reject(u.e):e},k.all=function(n){var e,r=this,o=L(r),u=[];function i(n){z(o,s,n)}return(e=S(F)(n,function(n,t){r.resolve(n).then(function(n){u[t]=n,--e||z(o,a,u)},i)}))===y?r.reject(e.e):(e||z(o,a,[]),o)},k.allSettled=function(n){var e,r=this,o=L(r),u=[];return(e=S(F)(n,function(n,t){r.resolve(n).then(function(n){u[t]={status:"fulfilled",value:n},--e||z(o,a,u)},function(n){u[t]={status:"rejected",reason:n},--e||z(o,a,u)})}))===y?r.reject(e.e):(e||z(o,a,[]),o)},S(function(){Object.defineProperty(k,b(),{get:function(){return this}})})(),k._Yaku=1;var P=T(999,function(n,t){var e,r;(r=n._s?t._onFulfilled:t._onRejected)!==i?(e=S(q)(r,n._v))!==y?B(t,e):z(t,s,e.e):z(t,n._s,n._v)}),A=T(9,function(n){(function n(t){{if(t._umark)return!0;t._umark=!0}var e,r=0,o=t._pCount;for(;r<o;)if((e=t[r++])._onRejected||n(e))return!0})(n)||(n._uh=1,E(w,n))});function E(n,t){var e="on"+n.toLowerCase(),r=u[e];f&&f.listeners(n).length?n===w?f.emit(n,t._v,t):f.emit(n,t):r&&r({reason:t._v,promise:t})}function H(n){return n&&n._Yaku}function L(n){return H(n)?new n(j):(e=new n(function(n,t){if(e)throw I();r=n,o=t}),R(r,x),R(o,x),e);var e,r,o}function O(t,e){var r=!1;return function(n){r||(r=!0,e===a?B(t,n):z(t,e,n))}}function q(n,t){return n(t)}function z(n,t,e){var r=0,o=n._pCount;if(n._s===l)for(n._s=t,n._v=e,t===s&&A(n);r<o;)P(n,n[r++]);return n}function B(n,t){if(t===n&&t)return z(n,s,I(p)),n;if(t!==o&&(x(t)||C(t))){var e=S(D)(t);if(e===y)return z(n,s,e.e),n;x(e)?H(t)?G(n,t,e):g(function(){G(n,t,e)}):z(n,a,t)}else z(n,a,t);return n}function D(n){return n.then}function G(t,e,n){var r=S(n,e)(function(n){e&&(e=o,B(t,n))},function(n){e&&(e=o,z(t,s,n))});r===y&&e&&(z(t,s,r.e),e=o)}try{module.exports=k}catch(n){u.Yaku=k}}(); |
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var u,e,r,o=null,n="object"==typeof self,i=n?self:global,t=i.Promise,c=i.process,f=i.console,s=!1,a=Array,l=Error,h=1,_=2,v=3,p="Symbol",d="species",m="return",y="_pt",w="_st",g="Invalid argument",j="\nFrom previous ",k="Chaining cycle detected for promise",x="unhandledRejection",b={e:o},T=function(){},S=/^.+\/node_modules\/yaku\/.+\n?/gm,R=function(n){var t,e=this;if(!F(e)||e._s!==u)throw U("Invalid this");if(e._s=v,s&&(e[y]=Y()),n!==T){if(!E(n))throw U(g);(t=P(n)(G(e,_),G(e,h)))===b&&M(e,h,t.e)}};function C(){return R[p][d]||"Symbol(species)"}function F(n){return n&&"object"==typeof n}function E(n){return"function"==typeof n}function H(n,t){return n instanceof t}function I(n,t,e){if(!t(n))throw U(e)}function L(){try{return e.apply(r,arguments)}catch(n){return b.e=n,b}}function P(n,t){return e=n,r=t,L}function A(t,e){var r=a(t),o=0;function i(){for(var n=0;n<o;)e(r[n],r[n+1]),r[n++]=u,r[n++]=u;o=0,r.length>t&&(r.length=t)}return function(n,t){r[o++]=n,r[o++]=t,2===o&&R.nextTick(i)}}function O(n,t){var e,r,o,i,u=0;if(!n)throw U(g);var c=n[R[p].iterator];if(E(c))r=c.call(n);else{if(!E(n.next)){if(H(n,a)){for(e=n.length;u<e;)t(n[u],u++);return u}throw U(g)}r=n}for(;!(o=r.next()).done;)if((i=P(t)(o.value,u++))===b)throw E(r[m])&&r[m](),i.e;return u}function U(n){return new TypeError(n)}function Y(n){return(n?"":j)+(new l).stack}(function(n,t){for(var e in t)n[e]=t[e]})((R.default=R).prototype,{then:function(n,t){if(void 0===this._s)throw U();return function(n,t,e,r){E(e)&&(t._onFulfilled=e);E(r)&&(n._uh&&z("rejectionHandled",n),t._onRejected=r);s&&(t._p=n);n[n._c++]=t,n._s!==v&&$(n,t);return t}(this,D(R.speciesConstructor(this,R)),n,t)},catch:function(n){return this.then(u,n)},finally:function(t){return this.then(function(n){return R.resolve(t()).then(function(){return n})},function(n){return R.resolve(t()).then(function(){throw n})})},_c:0,_p:o}),R.resolve=function(n){return B(n)?n:N(D(this),n)},R.reject=function(n){return M(D(this),h,n)},R.race=function(n){var t=this,e=D(t),r=function(n){M(e,_,n)},o=function(n){M(e,h,n)},i=P(O)(n,function(n){t.resolve(n).then(r,o)});return i===b?t.reject(i.e):e},R.all=function(n){var e,r=this,o=D(r),i=[];function u(n){M(o,h,n)}return(e=P(O)(n,function(n,t){r.resolve(n).then(function(n){i[t]=n,--e||M(o,_,i)},u)}))===b?r.reject(e.e):(e||M(o,_,[]),o)},R.Symbol=i[p]||{},P(function(){Object.defineProperty(R,C(),{get:function(){return this}})})(),R.speciesConstructor=function(n,t){var e=n.constructor;return e&&e[C()]||t},R.unhandledRejection=function(n,t){f&&f.error("Uncaught (in promise)",s?t.longStack:J(n,t))},R.rejectionHandled=T,R.enableLongStackTrace=function(){s=!0},R.nextTick=n?function(n){t?new t(function(n){n()}).then(n):setTimeout(n)}:c.nextTick,R._s=1;var $=A(999,function(n,t){var e,r;(r=n._s!==h?t._onFulfilled:t._onRejected)!==u?(e=P(K)(r,n._v))!==b?N(t,e):M(t,h,e.e):M(t,n._s,n._v)}),q=A(9,function(n){(function n(t){{if(t._umark)return!0;t._umark=!0}var e,r=0,o=t._c;for(;r<o;)if((e=t[r++])._onRejected||n(e))return!0})(n)||(n._uh=1,z(x,n))});function z(n,t){var e="on"+n.toLowerCase(),r=i[e];c&&c.listeners(n).length?n===x?c.emit(n,t._v,t):c.emit(n,t):r?r({reason:t._v,promise:t}):R[n](t._v,t)}function B(n){return n&&n._s}function D(n){return B(n)?new n(T):(e=new n(function(n,t){if(e)throw U();r=n,o=t}),I(r,E),I(o,E),e);var e,r,o}function G(t,e){var r=!1;return function(n){r||(r=!0,s&&(t[w]=Y(!0)),e===_?N(t,n):M(t,e,n))}}function J(n,t){var e=[];function r(n){return e.push(n.replace(/^\s+|\s+$/g,""))}return s&&(t[w]&&r(t[w]),function n(t){t&&y in t&&(n(t._next),r(t[y]+""),n(t._p))}(t)),(n&&n.stack?n.stack:n)+("\n"+e.join("\n")).replace(S,"")}function K(n,t){return n(t)}function M(n,t,e){var r=0,o=n._c;if(n._s===v)for(n._s=t,n._v=e,t===h&&(s&&H(e,l)&&(e.longStack=J(e,n)),q(n));r<o;)$(n,n[r++]);return n}function N(n,t){if(t===n&&t)return M(n,h,U(k)),n;if(t!==o&&(E(t)||F(t))){var e=P(Q)(t);if(e===b)return M(n,h,e.e),n;E(e)?(s&&B(t)&&(n._next=t),B(t)?V(n,t,e):R.nextTick(function(){V(n,t,e)})):M(n,_,t)}else M(n,_,t);return n}function Q(n){return n.then}function V(t,e,n){var r=P(n,e)(function(n){e&&(e=o,N(t,n))},function(n){e&&(e=o,M(t,h,n))});r===b&&e&&(M(t,h,r.e),e=o)}try{module.exports=R}catch(n){i.Yaku=R}}(); | ||
!function(){"use strict";var u,e,r,o=null,n="object"==typeof self,i=n?self:global,t=i.Promise,c=i.process,f=i.console,s=!1,a=Array,l=Error,h=1,v=2,_=3,d="Symbol",p="species",m="return",j="_pt",y="_st",w="Invalid argument",g="\nFrom previous ",k="Chaining cycle detected for promise",x="unhandledRejection",b={e:o},S=function(){},T=/^.+\/node_modules\/yaku\/.+\n?/gm,R=function(n){var t,e=this;if(!F(e)||e._s!==u)throw U("Invalid this");if(e._s=_,s&&(e[j]=Y()),n!==S){if(!E(n))throw U(w);(t=P(n)(G(e,v),G(e,h)))===b&&M(e,h,t.e)}};function C(){return R[d][p]||"Symbol(species)"}function F(n){return n&&"object"==typeof n}function E(n){return"function"==typeof n}function H(n,t){return n instanceof t}function I(n,t,e){if(!t(n))throw U(e)}function L(){try{return e.apply(r,arguments)}catch(n){return b.e=n,b}}function P(n,t){return e=n,r=t,L}function A(t,e){var r=a(t),o=0;function i(){for(var n=0;n<o;)e(r[n],r[n+1]),r[n++]=u,r[n++]=u;o=0,r.length>t&&(r.length=t)}return function(n,t){r[o++]=n,r[o++]=t,2===o&&R.nextTick(i)}}function O(n,t){var e,r,o,i,u=0;if(!n)throw U(w);var c=n[R[d].iterator];if(E(c))r=c.call(n);else{if(!E(n.next)){if(H(n,a)){for(e=n.length;u<e;)t(n[u],u++);return u}throw U(w)}r=n}for(;!(o=r.next()).done;)if((i=P(t)(o.value,u++))===b)throw E(r[m])&&r[m](),i.e;return u}function U(n){return new TypeError(n)}function Y(n){return(n?"":g)+(new l).stack}(function(n,t){for(var e in t)n[e]=t[e]})((R.default=R).prototype,{then:function(n,t){if(void 0===this._s)throw U();return function(n,t,e,r){E(e)&&(t._onFulfilled=e);E(r)&&(n._uh&&z("rejectionHandled",n),t._onRejected=r);s&&(t._p=n);n[n._c++]=t,n._s!==_&&$(n,t);return t}(this,D(R.speciesConstructor(this,R)),n,t)},catch:function(n){return this.then(u,n)},finally:function(t){return this.then(function(n){return R.resolve(t()).then(function(){return n})},function(n){return R.resolve(t()).then(function(){throw n})})},_c:0,_p:o}),R.resolve=function(n){return B(n)?n:N(D(this),n)},R.reject=function(n){return M(D(this),h,n)},R.race=function(n){var t=this,e=D(t),r=function(n){M(e,v,n)},o=function(n){M(e,h,n)},i=P(O)(n,function(n){t.resolve(n).then(r,o)});return i===b?t.reject(i.e):e},R.all=function(n){var e,r=this,o=D(r),i=[];function u(n){M(o,h,n)}return(e=P(O)(n,function(n,t){r.resolve(n).then(function(n){i[t]=n,--e||M(o,v,i)},u)}))===b?r.reject(e.e):(e||M(o,v,[]),o)},R.allSettled=function(n){var e,r=this,o=D(r),i=[];return(e=P(O)(n,function(n,t){r.resolve(n).then(function(n){i[t]={status:"fulfilled",value:n},--e||M(o,v,i)},function(n){i[t]={status:"rejected",reason:n},--e||M(o,v,i)})}))===b?r.reject(e.e):(e||M(o,v,[]),o)},R.Symbol=i[d]||{},P(function(){Object.defineProperty(R,C(),{get:function(){return this}})})(),R.speciesConstructor=function(n,t){var e=n.constructor;return e&&e[C()]||t},R.unhandledRejection=function(n,t){f&&f.error("Uncaught (in promise)",s?t.longStack:J(n,t))},R.rejectionHandled=S,R.enableLongStackTrace=function(){s=!0},R.nextTick=n?function(n){t?new t(function(n){n()}).then(n):setTimeout(n)}:c.nextTick,R._s=1;var $=A(999,function(n,t){var e,r;(r=n._s!==h?t._onFulfilled:t._onRejected)!==u?(e=P(K)(r,n._v))!==b?N(t,e):M(t,h,e.e):M(t,n._s,n._v)}),q=A(9,function(n){(function n(t){{if(t._umark)return!0;t._umark=!0}var e,r=0,o=t._c;for(;r<o;)if((e=t[r++])._onRejected||n(e))return!0})(n)||(n._uh=1,z(x,n))});function z(n,t){var e="on"+n.toLowerCase(),r=i[e];c&&c.listeners(n).length?n===x?c.emit(n,t._v,t):c.emit(n,t):r?r({reason:t._v,promise:t}):R[n](t._v,t)}function B(n){return n&&n._s}function D(n){return B(n)?new n(S):(e=new n(function(n,t){if(e)throw U();r=n,o=t}),I(r,E),I(o,E),e);var e,r,o}function G(t,e){var r=!1;return function(n){r||(r=!0,s&&(t[y]=Y(!0)),e===v?N(t,n):M(t,e,n))}}function J(n,t){var e=[];function r(n){return e.push(n.replace(/^\s+|\s+$/g,""))}return s&&(t[y]&&r(t[y]),function n(t){t&&j in t&&(n(t._next),r(t[j]+""),n(t._p))}(t)),(n&&n.stack?n.stack:n)+("\n"+e.join("\n")).replace(T,"")}function K(n,t){return n(t)}function M(n,t,e){var r=0,o=n._c;if(n._s===_)for(n._s=t,n._v=e,t===h&&(s&&H(e,l)&&(e.longStack=J(e,n)),q(n));r<o;)$(n,n[r++]);return n}function N(n,t){if(t===n&&t)return M(n,h,U(k)),n;if(t!==o&&(E(t)||F(t))){var e=P(Q)(t);if(e===b)return M(n,h,e.e),n;E(e)?(s&&B(t)&&(n._next=t),B(t)?V(n,t,e):R.nextTick(function(){V(n,t,e)})):M(n,v,t)}else M(n,v,t);return n}function Q(n){return n.then}function V(t,e,n){var r=P(n,e)(function(n){e&&(e=o,N(t,n))},function(n){e&&(e=o,M(t,h,n))});r===b&&e&&(M(t,h,r.e),e=o)}try{module.exports=R}catch(n){i.Yaku=R}}(); |
@@ -288,3 +288,3 @@ /** | ||
var self = this | ||
, p1 = newCapablePromise(self) | ||
, p = newCapablePromise(self) | ||
, res = [] | ||
@@ -295,3 +295,3 @@ , ret | ||
function reject (reason) { | ||
settlePromise(p1, $rejected, reason); | ||
settlePromise(p, $rejected, reason); | ||
} | ||
@@ -302,3 +302,3 @@ | ||
res[i] = value; | ||
if (!--ret) settlePromise(p1, $resolved, res); | ||
if (!--ret) settlePromise(p, $resolved, res); | ||
}, reject); | ||
@@ -309,7 +309,51 @@ }); | ||
if (!ret) settlePromise(p1, $resolved, []); | ||
if (!ret) settlePromise(p, $resolved, []); | ||
return p1; | ||
return p; | ||
}; | ||
/** | ||
* The `Promise.allSettled(iterable)` method returns a promise that resolves after all | ||
* of the given promises have either resolved or rejected, with an array of objects that | ||
* each describes the outcome of each promise. | ||
* @param {iterable} iterable An iterable object, such as an Array. | ||
* @return {Yaku} A promise resolves a list of objects. For each object, a status string is present. | ||
* If the status is fulfilled, then a value is present. If the status is rejected, then a reason is present. | ||
* The value (or reason) reflects what value each promise was fulfilled (or rejected) with. | ||
* @example | ||
* ```js | ||
* var Promise = require('yaku'); | ||
* Promise.allSettled([ | ||
* Promise.resolve(3), | ||
* new Promise((resolve, reject) => setTimeout(reject, 100, 'foo')) | ||
* ]) | ||
* .then((values) => { | ||
* console.log(values); // => [{status: "fulfilled", value: 3}, {status: "rejected", reason: "foo"}] | ||
* }); | ||
* ``` | ||
*/ | ||
Yaku.allSettled = function (iterable) { | ||
var self = this | ||
, p = newCapablePromise(self) | ||
, res = [] | ||
, ret | ||
; | ||
ret = genTryCatcher(each)(iterable, function (item, i) { | ||
self.resolve(item).then(function (value) { | ||
res[i] = { status: 'fulfilled', value: value }; | ||
if (!--ret) settlePromise(p, $resolved, res); | ||
}, function (value) { | ||
res[i] = { status: 'rejected', reason: value }; | ||
if (!--ret) settlePromise(p, $resolved, res); | ||
}); | ||
}); | ||
if (ret === $tryErr) return self.reject(ret.e); | ||
if (!ret) settlePromise(p, $resolved, []); | ||
return p; | ||
}; | ||
// To support browsers that don't support `Object.defineProperty`. | ||
@@ -316,0 +360,0 @@ genTryCatcher(function () { |
/* | ||
Yaku v0.19.3 | ||
Yaku v1.0.0 | ||
(c) 2015 Yad Smood. http://ysmood.org | ||
@@ -285,3 +285,3 @@ License MIT | ||
var self = this | ||
, p1 = newCapablePromise(self) | ||
, p = newCapablePromise(self) | ||
, res = [] | ||
@@ -292,3 +292,3 @@ , ret | ||
function reject (reason) { | ||
settlePromise(p1, $rejected, reason); | ||
settlePromise(p, $rejected, reason); | ||
} | ||
@@ -299,3 +299,3 @@ | ||
res[i] = value; | ||
if (!--ret) settlePromise(p1, $resolved, res); | ||
if (!--ret) settlePromise(p, $resolved, res); | ||
}, reject); | ||
@@ -306,8 +306,52 @@ }); | ||
if (!ret) settlePromise(p1, $resolved, []); | ||
if (!ret) settlePromise(p, $resolved, []); | ||
return p1; | ||
return p; | ||
}; | ||
/** | ||
* The `Promise.allSettled(iterable)` method returns a promise that resolves after all | ||
* of the given promises have either resolved or rejected, with an array of objects that | ||
* each describes the outcome of each promise. | ||
* @param {iterable} iterable An iterable object, such as an Array. | ||
* @return {Yaku} A promise resolves a list of objects. For each object, a status string is present. | ||
* If the status is fulfilled, then a value is present. If the status is rejected, then a reason is present. | ||
* The value (or reason) reflects what value each promise was fulfilled (or rejected) with. | ||
* @example | ||
* ```js | ||
* var Promise = require('yaku'); | ||
* Promise.allSettled([ | ||
* Promise.resolve(3), | ||
* new Promise((resolve, reject) => setTimeout(reject, 100, 'foo')) | ||
* ]) | ||
* .then((values) => { | ||
* console.log(values); // => [{status: "fulfilled", value: 3}, {status: "rejected", reason: "foo"}] | ||
* }); | ||
* ``` | ||
*/ | ||
Yaku.allSettled = function (iterable) { | ||
var self = this | ||
, p = newCapablePromise(self) | ||
, res = [] | ||
, ret | ||
; | ||
ret = genTryCatcher(each)(iterable, function (item, i) { | ||
self.resolve(item).then(function (value) { | ||
res[i] = { status: 'fulfilled', value: value }; | ||
if (!--ret) settlePromise(p, $resolved, res); | ||
}, function (value) { | ||
res[i] = { status: 'rejected', reason: value }; | ||
if (!--ret) settlePromise(p, $resolved, res); | ||
}); | ||
}); | ||
if (ret === $tryErr) return self.reject(ret.e); | ||
if (!ret) settlePromise(p, $resolved, []); | ||
return p; | ||
}; | ||
/** | ||
* The ES6 Symbol object that Yaku should use, by default it will use the | ||
@@ -314,0 +358,0 @@ * global one. |
{ | ||
"name": "yaku", | ||
"version": "0.19.3", | ||
"version": "1.0.0", | ||
"description": "A lightweight promise library", | ||
@@ -5,0 +5,0 @@ "main": "lib/yaku.js", |
@@ -17,3 +17,3 @@ <a href="http://promisesaplus.com/"> | ||
[![NPM version](https://badge.fury.io/js/yaku.svg)](http://badge.fury.io/js/yaku) [![Build Status](https://travis-ci.org/ysmood/yaku.svg)](https://travis-ci.org/ysmood/yaku) [![Deps Up to Date](https://david-dm.org/ysmood/yaku.svg?style=flat)](https://david-dm.org/ysmood/yaku) [![Coverage Status](https://coveralls.io/repos/ysmood/yaku/badge.svg?branch=master&service=github)](https://coveralls.io/github/ysmood/yaku?branch=master) | ||
[![NPM version](https://badge.fury.io/js/yaku.svg)](http://badge.fury.io/js/yaku) [![Build Status](https://travis-ci.org/ysmood/yaku.svg)](https://travis-ci.org/ysmood/yaku) [![Coverage Status](https://coveralls.io/repos/ysmood/yaku/badge.svg?branch=master&service=github)](https://coveralls.io/github/ysmood/yaku?branch=master) | ||
@@ -24,3 +24,3 @@ | ||
- One of the best for mobile, gzipped file is only 1.9KB | ||
- One of the best for mobile, gzipped file is only 2.0KB | ||
- Supports "uncaught rejection" and "long stack trace", [Comparison][docs/debugHelperComparison.md] | ||
@@ -31,4 +31,5 @@ - Works on IE5+ and other major browsers | ||
- Well commented source code with every Promises/A+ spec | ||
- Highly modularized extra helpers, no pollution to its pure ES6 implements | ||
- Highly modularized extra helpers, no pollution to its pure ES6 implementation | ||
- Supports ES7 `finally` | ||
- Composable observable helper | ||
@@ -164,2 +165,3 @@ | ||
- [Yaku.all(iterable)](#yakualliterable) | ||
- [Yaku.allSettled(iterable)](#yakuallsettlediterable) | ||
- [Yaku.Symbol](#yakusymbol) | ||
@@ -405,4 +407,33 @@ - [Yaku.speciesConstructor(O, defaultConstructor)](#yakuspeciesconstructoro-defaultconstructor) | ||
- ### **[Yaku.Symbol](src/yaku.js?source#L314)** | ||
- ### **[Yaku.allSettled(iterable)](src/yaku.js?source#L323)** | ||
The `Promise.allSettled(iterable)` method returns a promise that resolves after all | ||
of the given promises have either resolved or rejected, with an array of objects that | ||
each describes the outcome of each promise. | ||
- **<u>param</u>**: `iterable` { _iterable_ } | ||
An iterable object, such as an Array. | ||
- **<u>return</u>**: { _Yaku_ } | ||
A promise resolves a list of objects. For each object, a status string is present. | ||
If the status is fulfilled, then a value is present. If the status is rejected, then a reason is present. | ||
The value (or reason) reflects what value each promise was fulfilled (or rejected) with. | ||
- **<u>example</u>**: | ||
```js | ||
var Promise = require('yaku'); | ||
Promise.allSettled([ | ||
Promise.resolve(3), | ||
new Promise((resolve, reject) => setTimeout(reject, 100, 'foo')) | ||
]) | ||
.then((values) => { | ||
console.log(values); // => [{status: "fulfilled", value: 3}, {status: "rejected", reason: "foo"}] | ||
}); | ||
``` | ||
- ### **[Yaku.Symbol](src/yaku.js?source#L358)** | ||
The ES6 Symbol object that Yaku should use, by default it will use the | ||
@@ -421,3 +452,3 @@ global one. | ||
- ### **[Yaku.speciesConstructor(O, defaultConstructor)](src/yaku.js?source#L329)** | ||
- ### **[Yaku.speciesConstructor(O, defaultConstructor)](src/yaku.js?source#L373)** | ||
@@ -433,3 +464,3 @@ Use this api to custom the species behavior. | ||
- ### **[Yaku.unhandledRejection(reason, p)](src/yaku.js?source#L355)** | ||
- ### **[Yaku.unhandledRejection(reason, p)](src/yaku.js?source#L399)** | ||
@@ -463,3 +494,3 @@ Catch all possibly unhandled rejections. If you want to use specific | ||
- ### **[Yaku.rejectionHandled(reason, p)](src/yaku.js?source#L368)** | ||
- ### **[Yaku.rejectionHandled(reason, p)](src/yaku.js?source#L412)** | ||
@@ -477,3 +508,3 @@ Emitted whenever a Promise was rejected and an error handler was | ||
- ### **[Yaku.enableLongStackTrace](src/yaku.js?source#L386)** | ||
- ### **[Yaku.enableLongStackTrace](src/yaku.js?source#L430)** | ||
@@ -497,3 +528,3 @@ It is used to enable the long stack trace. | ||
- ### **[Yaku.nextTick](src/yaku.js?source#L409)** | ||
- ### **[Yaku.nextTick](src/yaku.js?source#L453)** | ||
@@ -500,0 +531,0 @@ Only Node has `process.nextTick` function. For browser there are |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
139174
2633
1
1242