Comparing version 0.17.8 to 0.17.9
@@ -7,3 +7,3 @@ !function(n){function r(e){if(t[e])return t[e].exports;var o=t[e]={exports:{},id:e,loaded:!1};return n[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var t={};return r.m=n,r.c=t,r.p="",r(0)}({0:/*!*****************************!*\ | ||
\*********************/ | ||
function(n,r){(function(r){!function(){"use strict";function t(){return en[U][$]||q}function e(n,r){for(var t in r)n[t]=r[t]}function o(n){return n&&"object"==typeof n}function i(n){return"function"==typeof n}function u(n,r){return n instanceof r}function c(n){return u(n,H)}function f(n,r,t){if(!r(n))throw h(t)}function s(){try{return E.apply(S,arguments)}catch(e){return nn.e=e,nn}}function a(n,r){return E=n,S=r,s}function l(n,r){function t(){for(var t=0;t<o;)r(e[t],e[t+1]),e[t++]=T,e[t++]=T;o=0,e.length>n&&(e.length=n)}var e=O(n),o=0;return function(n,r){e[o++]=n,e[o++]=r,2===o&&en.nextTick(t)}}function v(n,r){var t,e,o,c,f=0;if(!n)throw h(M);var s=n[en[U][Y]];if(i(s))e=s.call(n);else{if(!i(n.next)){if(u(n,O)){for(t=n.length;f<t;)r(n[f],f++);return f}throw h(M)}e=n}for(;!(o=e.next()).done;)if(c=a(r)(o.value,f++),c===nn)throw i(e[z])&&e[z](),c.e;return f}function h(n){return new TypeError(n)}function p(n){return(n?"":Q)+(new H).stack}function x(n,r){var t="on"+n.toLowerCase(),e=C[t];A&&A.listeners(n).length?n===Z?A.emit(n,r._v,r):A.emit(n,r):e?e({reason:r._v,promise:r}):en[n](r._v,r)}function d(n){return n&&n._s}function m(n){if(d(n))return new n(rn);var r,t,e;return r=new n(function(n,o){if(r)throw h();t=n,e=o}),f(t,i),f(e,i),r}function _(n,r){return function(t){N&&(n[J]=p(!0)),r===L?j(n,t):g(n,r,t)}}function b(n,r,t,e){return i(t)&&(r._onFulfilled=t),i(e)&&(n[B]&&x(X,n),r._onRejected=e),N&&(r._p=n),n[n._c++]=r,n._s!==D&&on(n,r),r}function y(n){if(n._umark)return!0;n._umark=!0;for(var r,t=0,e=n._c;t<e;)if(r=n[t++],r._onRejected||y(r))return!0}function w(n,r){function t(n){return e.push(n.replace(/^\s+|\s+$/g,""))}var e=[];return N&&(r[J]&&t(r[J]),function o(n){n&&G in n&&(o(n._next),t(n[G]+""),o(n._p))}(r)),(n&&n.stack?n.stack:n)+("\n"+e.join("\n")).replace(tn,"")}function P(n,r){return n(r)}function g(n,r,t){var e=0,o=n._c;if(n._s===D)for(n._s=r,n._v=t,r===I&&(N&&c(t)&&(t.longStack=w(t,n)),un(n));e<o;)on(n,n[e++]);return n}function j(n,r){if(r===n&&r)return g(n,I,h(V)),n;if(r!==R&&(i(r)||o(r))){var t=a(k)(r);if(t===nn)return g(n,I,t.e),n;i(t)?(N&&d(r)&&(n._next=r),d(r)?F(n,r,t):en.nextTick(function(){F(n,r,t)})):g(n,L,r)}else g(n,L,r);return n}function k(n){return n.then}function F(n,r,t){var e=a(t,r)(function(t){r&&(r=R,j(n,t))},function(t){r&&(r=R,g(n,I,t))});e===nn&&r&&(g(n,I,e.e),r=R)}var T,E,S,R=null,C="object"==typeof window?window:r,N=!1,A=C.process,O=Array,H=Error,I=1,L=2,D=3,U="Symbol",Y="iterator",$="species",q=U+"("+$+")",z="return",B="_uh",G="_pt",J="_st",K="Invalid this",M="Invalid argument",Q="\nFrom previous ",V="Chaining cycle detected for promise",W="Uncaught (in promise)",X="rejectionHandled",Z="unhandledRejection",nn={e:R},rn=function(){},tn=/^.+\/node_modules\/yaku\/.+\n?/gm,en=n.exports=function(n){var r,t=this;if(!o(t)||t._s!==T)throw h(K);if(t._s=D,N&&(t[G]=p()),n!==rn){if(!i(n))throw h(M);r=a(n)(_(t,L),_(t,I)),r===nn&&g(t,I,r.e)}};en["default"]=en,e(en.prototype,{then:function(n,r){if(void 0===this._s)throw h();return b(this,m(en.speciesConstructor(this,en)),n,r)},"catch":function(n){return this.then(T,n)},"finally":function(n){function r(r){return en.resolve(n()).then(function(){return r})}return this.then(r,r)},_c:0,_p:R}),en.resolve=function(n){return d(n)?n:j(m(this),n)},en.reject=function(n){return g(m(this),I,n)},en.race=function(n){var r=this,t=m(r),e=function(n){g(t,L,n)},o=function(n){g(t,I,n)},i=a(v)(n,function(n){r.resolve(n).then(e,o)});return i===nn?r.reject(i.e):t},en.all=function(n){function r(n){g(o,I,n)}var t,e=this,o=m(e),i=[];return t=a(v)(n,function(n,u){e.resolve(n).then(function(n){i[u]=n,--t||g(o,L,i)},r)}),t===nn?e.reject(t.e):(t||g(o,L,[]),o)},en.Symbol=C[U]||{},a(function(){Object.defineProperty(en,t(),{get:function(){return this}})})(),en.speciesConstructor=function(n,r){var e=n.constructor;return e?e[t()]||r:r},en.unhandledRejection=function(n,r){try{C.console.error(W,N?r.longStack:w(n,r))}catch(e){}},en.rejectionHandled=rn,en.enableLongStackTrace=function(){N=!0},en.nextTick=A?A.nextTick:function(n){setTimeout(n)},en._s=1;var on=l(999,function(n,r){var t,e;return e=n._s!==I?r._onFulfilled:r._onRejected,e===T?void g(r,n._s,n._v):(t=a(P)(e,n._v),t===nn?void g(r,I,t.e):void j(r,t))}),un=l(9,function(n){y(n)||(n[B]=1,x(Z,n))})}()}).call(r,function(){return this}())},84:/*!**********************!*\ | ||
function(n,r){(function(r){!function(){"use strict";function t(){return un[Y][q]||z}function e(n,r){for(var t in r)n[t]=r[t]}function o(n){return n&&"object"==typeof n}function i(n){return"function"==typeof n}function u(n,r){return n instanceof r}function c(n){return u(n,L)}function f(n,r,t){if(!r(n))throw p(t)}function s(){try{return E.apply(S,arguments)}catch(e){return tn.e=e,tn}}function a(n,r){return E=n,S=r,s}function l(n,r){function t(){for(var t=0;t<o;)r(e[t],e[t+1]),e[t++]=T,e[t++]=T;o=0,e.length>n&&(e.length=n)}var e=I(n),o=0;return function(n,r){e[o++]=n,e[o++]=r,2===o&&un.nextTick(t)}}function v(n,r){var t,e,o,c,f=0;if(!n)throw p(V);var s=n[un[Y][$]];if(i(s))e=s.call(n);else{if(!i(n.next)){if(u(n,I)){for(t=n.length;f<t;)r(n[f],f++);return f}throw p(V)}e=n}for(;!(o=e.next()).done;)if(c=a(r)(o.value,f++),c===tn)throw i(e[B])&&e[B](),c.e;return f}function p(n){return new TypeError(n)}function h(n){return(n?"":W)+(new L).stack}function x(n,r){var t="on"+n.toLowerCase(),e=C[t];O&&O.listeners(n).length?n===rn?O.emit(n,r._v,r):O.emit(n,r):e?e({reason:r._v,promise:r}):un[n](r._v,r)}function d(n){return n&&n._s}function m(n){if(d(n))return new n(en);var r,t,e;return r=new n(function(n,o){if(r)throw p();t=n,e=o}),f(t,i),f(e,i),r}function _(n,r){return function(t){H&&(n[M]=h(!0)),r===J?j(n,t):g(n,r,t)}}function b(n,r,t,e){return i(t)&&(r._onFulfilled=t),i(e)&&(n[G]&&x(nn,n),r._onRejected=e),H&&(r._p=n),n[n._c++]=r,n._s!==U&&cn(n,r),r}function y(n){if(n._umark)return!0;n._umark=!0;for(var r,t=0,e=n._c;t<e;)if(r=n[t++],r._onRejected||y(r))return!0}function w(n,r){function t(n){return e.push(n.replace(/^\s+|\s+$/g,""))}var e=[];return H&&(r[M]&&t(r[M]),function o(n){n&&K in n&&(o(n._next),t(n[K]+""),o(n._p))}(r)),(n&&n.stack?n.stack:n)+("\n"+e.join("\n")).replace(on,"")}function P(n,r){return n(r)}function g(n,r,t){var e=0,o=n._c;if(n._s===U)for(n._s=r,n._v=t,r===D&&(H&&c(t)&&(t.longStack=w(t,n)),fn(n));e<o;)cn(n,n[e++]);return n}function j(n,r){if(r===n&&r)return g(n,D,p(X)),n;if(r!==N&&(i(r)||o(r))){var t=a(k)(r);if(t===tn)return g(n,D,t.e),n;i(t)?(H&&d(r)&&(n._next=r),d(r)?F(n,r,t):un.nextTick(function(){F(n,r,t)})):g(n,J,r)}else g(n,J,r);return n}function k(n){return n.then}function F(n,r,t){var e=a(t,r)(function(t){r&&(r=N,j(n,t))},function(t){r&&(r=N,g(n,D,t))});e===tn&&r&&(g(n,D,e.e),r=N)}var T,E,S,N=null,R="object"==typeof window,C=R?window:r,O=C.process,A=C.console,H=!1,I=Array,L=Error,D=1,J=2,U=3,Y="Symbol",$="iterator",q="species",z=Y+"("+q+")",B="return",G="_uh",K="_pt",M="_st",Q="Invalid this",V="Invalid argument",W="\nFrom previous ",X="Chaining cycle detected for promise",Z="Uncaught (in promise)",nn="rejectionHandled",rn="unhandledRejection",tn={e:N},en=function(){},on=/^.+\/node_modules\/yaku\/.+\n?/gm,un=n.exports=function(n){var r,t=this;if(!o(t)||t._s!==T)throw p(Q);if(t._s=U,H&&(t[K]=h()),n!==en){if(!i(n))throw p(V);r=a(n)(_(t,J),_(t,D)),r===tn&&g(t,D,r.e)}};un["default"]=un,e(un.prototype,{then:function(n,r){if(void 0===this._s)throw p();return b(this,m(un.speciesConstructor(this,un)),n,r)},"catch":function(n){return this.then(T,n)},"finally":function(n){function r(r){return un.resolve(n()).then(function(){return r})}return this.then(r,r)},_c:0,_p:N}),un.resolve=function(n){return d(n)?n:j(m(this),n)},un.reject=function(n){return g(m(this),D,n)},un.race=function(n){var r=this,t=m(r),e=function(n){g(t,J,n)},o=function(n){g(t,D,n)},i=a(v)(n,function(n){r.resolve(n).then(e,o)});return i===tn?r.reject(i.e):t},un.all=function(n){function r(n){g(o,D,n)}var t,e=this,o=m(e),i=[];return t=a(v)(n,function(n,u){e.resolve(n).then(function(n){i[u]=n,--t||g(o,J,i)},r)}),t===tn?e.reject(t.e):(t||g(o,J,[]),o)},un.Symbol=C[Y]||{},a(function(){Object.defineProperty(un,t(),{get:function(){return this}})})(),un.speciesConstructor=function(n,r){var e=n.constructor;return e?e[t()]||r:r},un.unhandledRejection=function(n,r){A&&A.error(Z,H?r.longStack:w(n,r))},un.rejectionHandled=en,un.enableLongStackTrace=function(){H=!0},un.nextTick=R?function(n){setTimeout(n)}:O.nextTick,un._s=1;var cn=l(999,function(n,r){var t,e;return e=n._s!==D?r._onFulfilled:r._onRejected,e===T?void g(r,n._s,n._v):(t=a(P)(e,n._v),t===tn?void g(r,D,t.e):void j(r,t))}),fn=l(9,function(n){y(n)||(n[G]=1,x(rn,n))})}()}).call(r,function(){return this}())},84:/*!**********************!*\ | ||
!*** ./src/utils.js ***! | ||
@@ -14,3 +14,3 @@ \**********************/ | ||
\********************/ | ||
function(n,r,t){function e(n,r){try{return n(r)}catch(err){return c.err=err,c}}var o=t(/*! ./_ */86),i=o.Promise,u=t(/*! ./genIterator */87),c={};n.exports=function(n,r){return o.isNumber(n)||(r=n,n=1/0),new i(function(t,o){function f(){return l--,a("next")}function s(n){return l--,o(n)}function a(r){if(h)return void(0===l&&t());for(;l<n;){var e=v[r]();if(e.done)return 0===l&&t(),h=!0;l++,i.resolve(e.value).then(f,s)}}var l=0,v=u(r),h=!1,p=e(a,"next");p===c&&o(p.err)})}},86:/*!******************!*\ | ||
function(n,r,t){function e(n,r){try{return n(r)}catch(err){return c.err=err,c}}var o=t(/*! ./_ */86),i=o.Promise,u=t(/*! ./genIterator */87),c={};n.exports=function(n,r){return o.isNumber(n)||(r=n,n=1/0),new i(function(t,o){function f(){return l--,a("next")}function s(n){return l--,o(n)}function a(r){if(p)return void(0===l&&t());for(;l<n;){var e=v[r]();if(e.done)return 0===l&&t(),p=!0;l++,i.resolve(e.value).then(f,s)}}var l=0,v=u(r),p=!1,h=e(a,"next");h===c&&o(h.err)})}},86:/*!******************!*\ | ||
!*** ./src/_.js ***! | ||
@@ -51,3 +51,3 @@ \******************/ | ||
\**************************/ | ||
function(n,r,t){var e=t(/*! ./_ */86),o=e.isFunction;n.exports=function(n,r){return function(t,i,u,c,f){function s(n,r){null==n?v(r):h(n)}var a,l,v,h,p=arguments.length;switch(l=new e.Promise(function(n,r){v=n,h=r}),p){case 0:n.call(r,s);break;case 1:o(t)?n.call(r,t):n.call(r,t,s);break;case 2:o(i)?n.call(r,t,i):n.call(r,t,i,s);break;case 3:o(u)?n.call(r,t,i,u):n.call(r,t,i,u,s);break;case 4:o(c)?n.call(r,t,i,u,c):n.call(r,t,i,u,c,s);break;case 5:o(f)?n.call(r,t,i,u,c,f):n.call(r,t,i,u,c,f,s);break;default:a=new Array(p);for(var x=0;x<p;x++)a[x]=arguments[x];if(o(a[p-1]))return n.apply(r,a);a[x]=s,n.apply(r,a)}return l}}},98:/*!**********************!*\ | ||
function(n,r,t){var e=t(/*! ./_ */86),o=e.isFunction;n.exports=function(n,r){return function(t,i,u,c,f){function s(n,r){null==n?v(r):p(n)}var a,l,v,p,h=arguments.length;switch(l=new e.Promise(function(n,r){v=n,p=r}),h){case 0:n.call(r,s);break;case 1:o(t)?n.call(r,t):n.call(r,t,s);break;case 2:o(i)?n.call(r,t,i):n.call(r,t,i,s);break;case 3:o(u)?n.call(r,t,i,u):n.call(r,t,i,u,s);break;case 4:o(c)?n.call(r,t,i,u,c):n.call(r,t,i,u,c,s);break;case 5:o(f)?n.call(r,t,i,u,c,f):n.call(r,t,i,u,c,f,s);break;default:a=new Array(h);for(var x=0;x<h;x++)a[x]=arguments[x];if(o(a[h-1]))return n.apply(r,a);a[x]=s,n.apply(r,a)}return l}}},98:/*!**********************!*\ | ||
!*** ./src/sleep.js ***! | ||
@@ -61,8 +61,8 @@ \**********************/ | ||
\**********************/ | ||
function(n,r,t){var e=t(/*! ./_ */86),o=t(/*! ./sleep */98),i={};n.exports=function(n,r,t,u){return function(){function c(n){return n?t.apply(u,v):e.Promise.reject(i)}function f(n){return n===i?e.Promise.reject(l):(l.push(n),s(h(l)))}function s(n){return e.Promise.resolve(n).then(c)["catch"](f)}var a=n,l=[],v=arguments;e.isFunction(r)&&(u=t,t=r,r=0);var h=e.isFunction(a)?a:function(){return o(r,--a)};return s(!0)}}},101:/*!**********************!*\ | ||
function(n,r,t){var e=t(/*! ./_ */86),o=t(/*! ./sleep */98),i={};n.exports=function(n,r,t,u){return function(){function c(n){return n?t.apply(u,v):e.Promise.reject(i)}function f(n){return n===i?e.Promise.reject(l):(l.push(n),s(p(l)))}function s(n){return e.Promise.resolve(n).then(c)["catch"](f)}var a=n,l=[],v=arguments;e.isFunction(r)&&(u=t,t=r,r=0);var p=e.isFunction(a)?a:function(){return o(r,--a)};return s(!0)}}},101:/*!**********************!*\ | ||
!*** ./src/throw.js ***! | ||
\**********************/ | ||
function(n,r){n.exports=function(n){setTimeout(function(){throw n})}},102:/*!************************!*\ | ||
function(n,r){n.exports=function(n){setTimeout(function(){throw n instanceof Error?n:JSON.stringify(n,null,4)})}},102:/*!************************!*\ | ||
!*** ./src/timeout.js ***! | ||
\************************/ | ||
function(n,r,t){var e=t(/*! ./_ */86);n.exports=function(n,r,t){return void 0===t&&(t=new Error("time out")),new e.Promise(function(o,i){setTimeout(i,r,t),e.Promise.resolve(n).then(o,i)})}}}); |
@@ -7,2 +7,2 @@ !function(n){function t(e){if(r[e])return r[e].exports;var o=r[e]={exports:{},id:e,loaded:!1};return n[e].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=n,t.c=r,t.p="",t(0)}({0:/*!***********************!*\ | ||
\*********************/ | ||
function(n,t){(function(t){!function(){"use strict";function r(){return en[q][B]||D}function e(n,t){for(var r in t)n[r]=t[r]}function o(n){return n&&"object"==typeof n}function i(n){return"function"==typeof n}function u(n,t){return n instanceof t}function c(n){return u(n,A)}function f(n,t,r){if(!t(n))throw v(r)}function s(){try{return C.apply(F,arguments)}catch(e){return nn.e=e,nn}}function a(n,t){return C=n,F=t,s}function l(n,t){function r(){for(var r=0;r<o;)t(e[r],e[r+1]),e[r++]=S,e[r++]=S;o=0,e.length>n&&(e.length=n)}var e=L(n),o=0;return function(n,t){e[o++]=n,e[o++]=t,2===o&&en.nextTick(r)}}function h(n,t){var r,e,o,c,f=0;if(!n)throw v(Q);var s=n[en[q][z]];if(i(s))e=s.call(n);else{if(!i(n.next)){if(u(n,L)){for(r=n.length;f<r;)t(n[f],f++);return f}throw v(Q)}e=n}for(;!(o=e.next()).done;)if(c=a(t)(o.value,f++),c===nn)throw i(e[G])&&e[G](),c.e;return f}function v(n){return new TypeError(n)}function _(n){return(n?"":V)+(new A).stack}function d(n,t){var r="on"+n.toLowerCase(),e=E[r];I&&I.listeners(n).length?n===Z?I.emit(n,t._v,t):I.emit(n,t):e?e({reason:t._v,promise:t}):en[n](t._v,t)}function p(n){return n&&n._s}function w(n){if(p(n))return new n(tn);var t,r,e;return t=new n(function(n,o){if(t)throw v();r=n,e=o}),f(r,i),f(e,i),t}function m(n,t){return function(r){H&&(n[M]=_(!0)),t===U?T(n,r):k(n,t,r)}}function y(n,t,r,e){return i(r)&&(t._onFulfilled=r),i(e)&&(n[J]&&d(Y,n),t._onRejected=e),H&&(t._p=n),n[n._c++]=t,n._s!==$&&on(n,t),t}function j(n){if(n._umark)return!0;n._umark=!0;for(var t,r=0,e=n._c;r<e;)if(t=n[r++],t._onRejected||j(t))return!0}function x(n,t){function r(n){return e.push(n.replace(/^\s+|\s+$/g,""))}var e=[];return H&&(t[M]&&r(t[M]),function o(n){n&&K in n&&(o(n._next),r(n[K]+""),o(n._p))}(t)),(n&&n.stack?n.stack:n)+("\n"+e.join("\n")).replace(rn,"")}function g(n,t){return n(t)}function k(n,t,r){var e=0,o=n._c;if(n._s===$)for(n._s=t,n._v=r,t===O&&(H&&c(r)&&(r.longStack=x(r,n)),un(n));e<o;)on(n,n[e++]);return n}function T(n,t){if(t===n&&t)return k(n,O,v(W)),n;if(t!==P&&(i(t)||o(t))){var r=a(b)(t);if(r===nn)return k(n,O,r.e),n;i(r)?(H&&p(t)&&(n._next=t),p(t)?R(n,t,r):en.nextTick(function(){R(n,t,r)})):k(n,U,t)}else k(n,U,t);return n}function b(n){return n.then}function R(n,t,r){var e=a(r,t)(function(r){t&&(t=P,T(n,r))},function(r){t&&(t=P,k(n,O,r))});e===nn&&t&&(k(n,O,e.e),t=P)}var S,C,F,P=null,E="object"==typeof window?window:t,H=!1,I=E.process,L=Array,A=Error,O=1,U=2,$=3,q="Symbol",z="iterator",B="species",D=q+"("+B+")",G="return",J="_uh",K="_pt",M="_st",N="Invalid this",Q="Invalid argument",V="\nFrom previous ",W="Chaining cycle detected for promise",X="Uncaught (in promise)",Y="rejectionHandled",Z="unhandledRejection",nn={e:P},tn=function(){},rn=/^.+\/node_modules\/yaku\/.+\n?/gm,en=n.exports=function(n){var t,r=this;if(!o(r)||r._s!==S)throw v(N);if(r._s=$,H&&(r[K]=_()),n!==tn){if(!i(n))throw v(Q);t=a(n)(m(r,U),m(r,O)),t===nn&&k(r,O,t.e)}};en["default"]=en,e(en.prototype,{then:function(n,t){if(void 0===this._s)throw v();return y(this,w(en.speciesConstructor(this,en)),n,t)},"catch":function(n){return this.then(S,n)},"finally":function(n){function t(t){return en.resolve(n()).then(function(){return t})}return this.then(t,t)},_c:0,_p:P}),en.resolve=function(n){return p(n)?n:T(w(this),n)},en.reject=function(n){return k(w(this),O,n)},en.race=function(n){var t=this,r=w(t),e=function(n){k(r,U,n)},o=function(n){k(r,O,n)},i=a(h)(n,function(n){t.resolve(n).then(e,o)});return i===nn?t.reject(i.e):r},en.all=function(n){function t(n){k(o,O,n)}var r,e=this,o=w(e),i=[];return r=a(h)(n,function(n,u){e.resolve(n).then(function(n){i[u]=n,--r||k(o,U,i)},t)}),r===nn?e.reject(r.e):(r||k(o,U,[]),o)},en.Symbol=E[q]||{},a(function(){Object.defineProperty(en,r(),{get:function(){return this}})})(),en.speciesConstructor=function(n,t){var e=n.constructor;return e?e[r()]||t:t},en.unhandledRejection=function(n,t){try{E.console.error(X,H?t.longStack:x(n,t))}catch(e){}},en.rejectionHandled=tn,en.enableLongStackTrace=function(){H=!0},en.nextTick=I?I.nextTick:function(n){setTimeout(n)},en._s=1;var on=l(999,function(n,t){var r,e;return e=n._s!==O?t._onFulfilled:t._onRejected,e===S?void k(t,n._s,n._v):(r=a(g)(e,n._v),r===nn?void k(t,O,r.e):void T(t,r))}),un=l(9,function(n){j(n)||(n[J]=1,d(Z,n))})}()}).call(t,function(){return this}())}}); | ||
function(n,t){(function(t){!function(){"use strict";function r(){return un[B][G]||J}function e(n,t){for(var r in t)n[r]=t[r]}function o(n){return n&&"object"==typeof n}function i(n){return"function"==typeof n}function u(n,t){return n instanceof t}function c(n){return u(n,U)}function f(n,t,r){if(!t(n))throw v(r)}function s(){try{return C.apply(F,arguments)}catch(e){return rn.e=e,rn}}function a(n,t){return C=n,F=t,s}function l(n,t){function r(){for(var r=0;r<o;)t(e[r],e[r+1]),e[r++]=S,e[r++]=S;o=0,e.length>n&&(e.length=n)}var e=O(n),o=0;return function(n,t){e[o++]=n,e[o++]=t,2===o&&un.nextTick(r)}}function h(n,t){var r,e,o,c,f=0;if(!n)throw v(W);var s=n[un[B][D]];if(i(s))e=s.call(n);else{if(!i(n.next)){if(u(n,O)){for(r=n.length;f<r;)t(n[f],f++);return f}throw v(W)}e=n}for(;!(o=e.next()).done;)if(c=a(t)(o.value,f++),c===rn)throw i(e[K])&&e[K](),c.e;return f}function v(n){return new TypeError(n)}function _(n){return(n?"":X)+(new U).stack}function d(n,t){var r="on"+n.toLowerCase(),e=H[r];I&&I.listeners(n).length?n===tn?I.emit(n,t._v,t):I.emit(n,t):e?e({reason:t._v,promise:t}):un[n](t._v,t)}function p(n){return n&&n._s}function w(n){if(p(n))return new n(en);var t,r,e;return t=new n(function(n,o){if(t)throw v();r=n,e=o}),f(r,i),f(e,i),t}function m(n,t){return function(r){A&&(n[Q]=_(!0)),t===q?T(n,r):k(n,t,r)}}function y(n,t,r,e){return i(r)&&(t._onFulfilled=r),i(e)&&(n[M]&&d(nn,n),t._onRejected=e),A&&(t._p=n),n[n._c++]=t,n._s!==z&&cn(n,t),t}function j(n){if(n._umark)return!0;n._umark=!0;for(var t,r=0,e=n._c;r<e;)if(t=n[r++],t._onRejected||j(t))return!0}function x(n,t){function r(n){return e.push(n.replace(/^\s+|\s+$/g,""))}var e=[];return A&&(t[Q]&&r(t[Q]),function o(n){n&&N in n&&(o(n._next),r(n[N]+""),o(n._p))}(t)),(n&&n.stack?n.stack:n)+("\n"+e.join("\n")).replace(on,"")}function g(n,t){return n(t)}function k(n,t,r){var e=0,o=n._c;if(n._s===z)for(n._s=t,n._v=r,t===$&&(A&&c(r)&&(r.longStack=x(r,n)),fn(n));e<o;)cn(n,n[e++]);return n}function T(n,t){if(t===n&&t)return k(n,$,v(Y)),n;if(t!==P&&(i(t)||o(t))){var r=a(b)(t);if(r===rn)return k(n,$,r.e),n;i(r)?(A&&p(t)&&(n._next=t),p(t)?R(n,t,r):un.nextTick(function(){R(n,t,r)})):k(n,q,t)}else k(n,q,t);return n}function b(n){return n.then}function R(n,t,r){var e=a(r,t)(function(r){t&&(t=P,T(n,r))},function(r){t&&(t=P,k(n,$,r))});e===rn&&t&&(k(n,$,e.e),t=P)}var S,C,F,P=null,E="object"==typeof window,H=E?window:t,I=H.process,L=H.console,A=!1,O=Array,U=Error,$=1,q=2,z=3,B="Symbol",D="iterator",G="species",J=B+"("+G+")",K="return",M="_uh",N="_pt",Q="_st",V="Invalid this",W="Invalid argument",X="\nFrom previous ",Y="Chaining cycle detected for promise",Z="Uncaught (in promise)",nn="rejectionHandled",tn="unhandledRejection",rn={e:P},en=function(){},on=/^.+\/node_modules\/yaku\/.+\n?/gm,un=n.exports=function(n){var t,r=this;if(!o(r)||r._s!==S)throw v(V);if(r._s=z,A&&(r[N]=_()),n!==en){if(!i(n))throw v(W);t=a(n)(m(r,q),m(r,$)),t===rn&&k(r,$,t.e)}};un["default"]=un,e(un.prototype,{then:function(n,t){if(void 0===this._s)throw v();return y(this,w(un.speciesConstructor(this,un)),n,t)},"catch":function(n){return this.then(S,n)},"finally":function(n){function t(t){return un.resolve(n()).then(function(){return t})}return this.then(t,t)},_c:0,_p:P}),un.resolve=function(n){return p(n)?n:T(w(this),n)},un.reject=function(n){return k(w(this),$,n)},un.race=function(n){var t=this,r=w(t),e=function(n){k(r,q,n)},o=function(n){k(r,$,n)},i=a(h)(n,function(n){t.resolve(n).then(e,o)});return i===rn?t.reject(i.e):r},un.all=function(n){function t(n){k(o,$,n)}var r,e=this,o=w(e),i=[];return r=a(h)(n,function(n,u){e.resolve(n).then(function(n){i[u]=n,--r||k(o,q,i)},t)}),r===rn?e.reject(r.e):(r||k(o,q,[]),o)},un.Symbol=H[B]||{},a(function(){Object.defineProperty(un,r(),{get:function(){return this}})})(),un.speciesConstructor=function(n,t){var e=n.constructor;return e?e[r()]||t:t},un.unhandledRejection=function(n,t){L&&L.error(Z,A?t.longStack:x(n,t))},un.rejectionHandled=en,un.enableLongStackTrace=function(){A=!0},un.nextTick=E?function(n){setTimeout(n)}:I.nextTick,un._s=1;var cn=l(999,function(n,t){var r,e;return e=n._s!==$?t._onFulfilled:t._onRejected,e===S?void k(t,n._s,n._v):(r=a(g)(e,n._v),r===rn?void k(t,$,r.e):void T(t,r))}),fn=l(9,function(n){j(n)||(n[M]=1,d(tn,n))})}()}).call(t,function(){return this}())}}); |
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";function n(){return tn[U][q]||z}function t(n,t){for(var e in t)n[e]=t[e]}function e(n){return n&&"object"==typeof n}function r(n){return"function"==typeof n}function o(n,t){return n instanceof t}function i(n){return o(n,L)}function u(n,t,e){if(!t(n))throw l(e)}function c(){try{return R.apply(S,arguments)}catch(n){return Y.e=n,Y}}function f(n,t){return R=n,S=t,c}function s(n,t){function e(){for(var e=0;e<o;)t(r[e],r[e+1]),r[e++]=T,r[e++]=T;o=0,r.length>n&&(r.length=n)}var r=I(n),o=0;return function(n,t){r[o++]=n,r[o++]=t,2===o&&tn.nextTick(e)}}function a(n,t){var e,i,u,c,s=0;if(!n)throw l(M);var a=n[tn[U][$]];if(r(a))i=a.call(n);else{if(!r(n.next)){if(o(n,I)){for(e=n.length;s<e;)t(n[s],s++);return s}throw l(M)}i=n}for(;!(u=i.next()).done;)if(c=f(t)(u.value,s++),c===Y)throw r(i[B])&&i[B](),c.e;return s}function l(n){return new TypeError(n)}function h(n){return(n?"":N)+(new L).stack}function v(n,t){var e="on"+n.toLowerCase(),r=F[e];H&&H.listeners(n).length?n===X?H.emit(n,t._v,t):H.emit(n,t):r?r({reason:t._v,promise:t}):tn[n](t._v,t)}function _(n){return n&&n._s}function d(n){if(_(n))return new n(Z);var t,e,o;return t=new n(function(n,r){if(t)throw l();e=n,o=r}),u(e,r),u(o,r),t}function p(n,t){return function(e){E&&(n[J]=h(!0)),t===O?k(n,e):j(n,t,e)}}function w(n,t,e,o){return r(e)&&(t._onFulfilled=e),r(o)&&(n[D]&&v(W,n),t._onRejected=o),E&&(t._p=n),n[n._c++]=t,n._s!==P&&en(n,t),t}function m(n){if(n._umark)return!0;n._umark=!0;for(var t,e=0,r=n._c;e<r;)if(t=n[e++],t._onRejected||m(t))return!0}function y(n,t){function e(n){return r.push(n.replace(/^\s+|\s+$/g,""))}var r=[];return E&&(t[J]&&e(t[J]),function n(t){t&&G in t&&(n(t._next),e(t[G]+""),n(t._p))}(t)),(n&&n.stack?n.stack:n)+("\n"+r.join("\n")).replace(nn,"")}function g(n,t){return n(t)}function j(n,t,e){var r=0,o=n._c;if(n._s===P)for(n._s=t,n._v=e,t===A&&(E&&i(e)&&(e.longStack=y(e,n)),rn(n));r<o;)en(n,n[r++]);return n}function k(n,t){if(t===n&&t)return j(n,A,l(Q)),n;if(t!==C&&(r(t)||e(t))){var o=f(x)(t);if(o===Y)return j(n,A,o.e),n;r(o)?(E&&_(t)&&(n._next=t),_(t)?b(n,t,o):tn.nextTick(function(){b(n,t,o)})):j(n,O,t)}else j(n,O,t);return n}function x(n){return n.then}function b(n,t,e){var r=f(e,t)(function(e){t&&(t=C,k(n,e))},function(e){t&&(t=C,j(n,A,e))});r===Y&&t&&(j(n,A,r.e),t=C)}var T,R,S,C=null,F="object"==typeof window?window:global,E=!1,H=F.process,I=Array,L=Error,A=1,O=2,P=3,U="Symbol",$="iterator",q="species",z=U+"("+q+")",B="return",D="_uh",G="_pt",J="_st",K="Invalid this",M="Invalid argument",N="\nFrom previous ",Q="Chaining cycle detected for promise",V="Uncaught (in promise)",W="rejectionHandled",X="unhandledRejection",Y={e:C},Z=function(){},nn=/^.+\/node_modules\/yaku\/.+\n?/gm,tn=module.exports=function(n){var t,o=this;if(!e(o)||o._s!==T)throw l(K);if(o._s=P,E&&(o[G]=h()),n!==Z){if(!r(n))throw l(M);t=f(n)(p(o,O),p(o,A)),t===Y&&j(o,A,t.e)}};tn.default=tn,t(tn.prototype,{then:function(n,t){if(void 0===this._s)throw l();return w(this,d(tn.speciesConstructor(this,tn)),n,t)},catch:function(n){return this.then(T,n)},finally:function(n){function t(t){return tn.resolve(n()).then(function(){return t})}return this.then(t,t)},_c:0,_p:C}),tn.resolve=function(n){return _(n)?n:k(d(this),n)},tn.reject=function(n){return j(d(this),A,n)},tn.race=function(n){var t=this,e=d(t),r=function(n){j(e,O,n)},o=function(n){j(e,A,n)},i=f(a)(n,function(n){t.resolve(n).then(r,o)});return i===Y?t.reject(i.e):e},tn.all=function(n){function t(n){j(o,A,n)}var e,r=this,o=d(r),i=[];return e=f(a)(n,function(n,u){r.resolve(n).then(function(n){i[u]=n,--e||j(o,O,i)},t)}),e===Y?r.reject(e.e):(e||j(o,O,[]),o)},tn.Symbol=F[U]||{},f(function(){Object.defineProperty(tn,n(),{get:function(){return this}})})(),tn.speciesConstructor=function(t,e){var r=t.constructor;return r?r[n()]||e:e},tn.unhandledRejection=function(n,t){try{F.console.error(V,E?t.longStack:y(n,t))}catch(n){}},tn.rejectionHandled=Z,tn.enableLongStackTrace=function(){E=!0},tn.nextTick=H?H.nextTick:function(n){setTimeout(n)},tn._s=1;var en=s(999,function(n,t){var e,r;return r=n._s!==A?t._onFulfilled:t._onRejected,r===T?void j(t,n._s,n._v):(e=f(g)(r,n._v),e===Y?void j(t,A,e.e):void k(t,e))}),rn=s(9,function(n){m(n)||(n[D]=1,v(X,n))})}(); | ||
!function(){"use strict";function n(){return rn[q][B]||D}function t(n,t){for(var e in t)n[e]=t[e]}function e(n){return n&&"object"==typeof n}function r(n){return"function"==typeof n}function o(n,t){return n instanceof t}function i(n){return o(n,O)}function u(n,t,e){if(!t(n))throw l(e)}function c(){try{return R.apply(S,arguments)}catch(n){return nn.e=n,nn}}function f(n,t){return R=n,S=t,c}function s(n,t){function e(){for(var e=0;e<o;)t(r[e],r[e+1]),r[e++]=T,r[e++]=T;o=0,r.length>n&&(r.length=n)}var r=A(n),o=0;return function(n,t){r[o++]=n,r[o++]=t,2===o&&rn.nextTick(e)}}function a(n,t){var e,i,u,c,s=0;if(!n)throw l(Q);var a=n[rn[q][z]];if(r(a))i=a.call(n);else{if(!r(n.next)){if(o(n,A)){for(e=n.length;s<e;)t(n[s],s++);return s}throw l(Q)}i=n}for(;!(u=i.next()).done;)if(c=f(t)(u.value,s++),c===nn)throw r(i[G])&&i[G](),c.e;return s}function l(n){return new TypeError(n)}function h(n){return(n?"":V)+(new O).stack}function v(n,t){var e="on"+n.toLowerCase(),r=E[e];H&&H.listeners(n).length?n===Z?H.emit(n,t._v,t):H.emit(n,t):r?r({reason:t._v,promise:t}):rn[n](t._v,t)}function _(n){return n&&n._s}function d(n){if(_(n))return new n(tn);var t,e,o;return t=new n(function(n,r){if(t)throw l();e=n,o=r}),u(e,r),u(o,r),t}function p(n,t){return function(e){L&&(n[M]=h(!0)),t===U?k(n,e):y(n,t,e)}}function w(n,t,e,o){return r(e)&&(t._onFulfilled=e),r(o)&&(n[J]&&v(Y,n),t._onRejected=o),L&&(t._p=n),n[n._c++]=t,n._s!==$&&on(n,t),t}function m(n){if(n._umark)return!0;n._umark=!0;for(var t,e=0,r=n._c;e<r;)if(t=n[e++],t._onRejected||m(t))return!0}function g(n,t){function e(n){return r.push(n.replace(/^\s+|\s+$/g,""))}var r=[];return L&&(t[M]&&e(t[M]),function n(t){t&&K in t&&(n(t._next),e(t[K]+""),n(t._p))}(t)),(n&&n.stack?n.stack:n)+("\n"+r.join("\n")).replace(en,"")}function j(n,t){return n(t)}function y(n,t,e){var r=0,o=n._c;if(n._s===$)for(n._s=t,n._v=e,t===P&&(L&&i(e)&&(e.longStack=g(e,n)),un(n));r<o;)on(n,n[r++]);return n}function k(n,t){if(t===n&&t)return y(n,P,l(W)),n;if(t!==C&&(r(t)||e(t))){var o=f(x)(t);if(o===nn)return y(n,P,o.e),n;r(o)?(L&&_(t)&&(n._next=t),_(t)?b(n,t,o):rn.nextTick(function(){b(n,t,o)})):y(n,U,t)}else y(n,U,t);return n}function x(n){return n.then}function b(n,t,e){var r=f(e,t)(function(e){t&&(t=C,k(n,e))},function(e){t&&(t=C,y(n,P,e))});r===nn&&t&&(y(n,P,r.e),t=C)}var T,R,S,C=null,F="object"==typeof window,E=F?window:global,H=E.process,I=E.console,L=!1,A=Array,O=Error,P=1,U=2,$=3,q="Symbol",z="iterator",B="species",D=q+"("+B+")",G="return",J="_uh",K="_pt",M="_st",N="Invalid this",Q="Invalid argument",V="\nFrom previous ",W="Chaining cycle detected for promise",X="Uncaught (in promise)",Y="rejectionHandled",Z="unhandledRejection",nn={e:C},tn=function(){},en=/^.+\/node_modules\/yaku\/.+\n?/gm,rn=module.exports=function(n){var t,o=this;if(!e(o)||o._s!==T)throw l(N);if(o._s=$,L&&(o[K]=h()),n!==tn){if(!r(n))throw l(Q);t=f(n)(p(o,U),p(o,P)),t===nn&&y(o,P,t.e)}};rn.default=rn,t(rn.prototype,{then:function(n,t){if(void 0===this._s)throw l();return w(this,d(rn.speciesConstructor(this,rn)),n,t)},catch:function(n){return this.then(T,n)},finally:function(n){function t(t){return rn.resolve(n()).then(function(){return t})}return this.then(t,t)},_c:0,_p:C}),rn.resolve=function(n){return _(n)?n:k(d(this),n)},rn.reject=function(n){return y(d(this),P,n)},rn.race=function(n){var t=this,e=d(t),r=function(n){y(e,U,n)},o=function(n){y(e,P,n)},i=f(a)(n,function(n){t.resolve(n).then(r,o)});return i===nn?t.reject(i.e):e},rn.all=function(n){function t(n){y(o,P,n)}var e,r=this,o=d(r),i=[];return e=f(a)(n,function(n,u){r.resolve(n).then(function(n){i[u]=n,--e||y(o,U,i)},t)}),e===nn?r.reject(e.e):(e||y(o,U,[]),o)},rn.Symbol=E[q]||{},f(function(){Object.defineProperty(rn,n(),{get:function(){return this}})})(),rn.speciesConstructor=function(t,e){var r=t.constructor;return r?r[n()]||e:e},rn.unhandledRejection=function(n,t){I&&I.error(X,L?t.longStack:g(n,t))},rn.rejectionHandled=tn,rn.enableLongStackTrace=function(){L=!0},rn.nextTick=F?function(n){setTimeout(n)}:H.nextTick,rn._s=1;var on=s(999,function(n,t){var e,r;return r=n._s!==P?t._onFulfilled:t._onRejected,r===T?void y(t,n._s,n._v):(e=f(j)(r,n._v),e===nn?void y(t,P,e.e):void k(t,e))}),un=s(9,function(n){m(n)||(n[J]=1,v(Z,n))})}(); |
module.exports = function (err) { | ||
setTimeout(function () { | ||
throw err; | ||
if (err instanceof Error) | ||
throw err; | ||
else | ||
throw JSON.stringify(err, null, 4); | ||
}); | ||
}; |
/* | ||
Yaku v0.17.8 | ||
Yaku v0.17.9 | ||
(c) 2015 Yad Smood. http://ysmood.org | ||
@@ -11,5 +11,7 @@ License MIT | ||
, $null = null | ||
, root = typeof window === "object" ? window : global | ||
, isBrowser = typeof window === "object" | ||
, root = isBrowser ? window : global | ||
, process = root.process | ||
, console = root.console | ||
, isLongStackTrace = false | ||
, process = root.process | ||
, Arr = Array | ||
@@ -352,8 +354,6 @@ , Err = Error | ||
Yaku.unhandledRejection = function (reason, p) { | ||
try { | ||
root.console.error( | ||
$unhandledRejectionMsg, | ||
isLongStackTrace ? p.longStack : genStackInfo(reason, p) | ||
); | ||
} catch (e) {} // eslint-disable-line | ||
console && console.error( | ||
$unhandledRejectionMsg, | ||
isLongStackTrace ? p.longStack : genStackInfo(reason, p) | ||
); | ||
}; | ||
@@ -408,5 +408,5 @@ | ||
*/ | ||
Yaku.nextTick = process ? | ||
process.nextTick : | ||
function (fn) { setTimeout(fn); }; | ||
Yaku.nextTick = isBrowser ? | ||
function (fn) { setTimeout(fn); } : | ||
process.nextTick; | ||
@@ -413,0 +413,0 @@ // ********************** Private ********************** |
{ | ||
"name": "yaku", | ||
"version": "0.17.8", | ||
"version": "0.17.9", | ||
"description": "A lightweight promise library", | ||
@@ -5,0 +5,0 @@ "main": "lib/yaku.js", |
@@ -23,3 +23,3 @@ <a href="http://promisesaplus.com/"> | ||
- The best for mobile, gzipped file is only 1.9KB | ||
- One of the best for mobile, gzipped file is only 1.9KB | ||
- Supports "uncaught rejection" and "long stack trace", [Comparison][docs/debugHelperComparison.md] | ||
@@ -202,3 +202,3 @@ - Works on IE5+ and other major browsers | ||
- ### **[Yaku(executor)](src/yaku.js?source#L49)** | ||
- ### **[Yaku(executor)](src/yaku.js?source#L51)** | ||
@@ -215,3 +215,3 @@ This class follows the [Promises/A+](https://promisesaplus.com) and | ||
- ### **[then(onFulfilled, onRejected)](src/yaku.js?source#L97)** | ||
- ### **[then(onFulfilled, onRejected)](src/yaku.js?source#L99)** | ||
@@ -245,3 +245,3 @@ Appends fulfillment and rejection handlers to the promise, | ||
- ### **[catch(onRejected)](src/yaku.js?source#L124)** | ||
- ### **[catch(onRejected)](src/yaku.js?source#L126)** | ||
@@ -271,3 +271,3 @@ The `catch()` method returns a Promise and deals with rejected cases only. | ||
- ### **[finally(onFinally)](src/yaku.js?source#L144)** | ||
- ### **[finally(onFinally)](src/yaku.js?source#L146)** | ||
@@ -297,3 +297,3 @@ Register a callback to be invoked when a promise is settled (either fulfilled or rejected). | ||
- ### **[Yaku.resolve(value)](src/yaku.js?source#L174)** | ||
- ### **[Yaku.resolve(value)](src/yaku.js?source#L176)** | ||
@@ -318,3 +318,3 @@ The `Promise.resolve(value)` method returns a Promise object that is resolved with the given value. | ||
- ### **[Yaku.reject(reason)](src/yaku.js?source#L188)** | ||
- ### **[Yaku.reject(reason)](src/yaku.js?source#L190)** | ||
@@ -336,3 +336,3 @@ The `Promise.reject(reason)` method returns a Promise object that is rejected with the given reason. | ||
- ### **[Yaku.race(iterable)](src/yaku.js?source#L212)** | ||
- ### **[Yaku.race(iterable)](src/yaku.js?source#L214)** | ||
@@ -366,3 +366,3 @@ The `Promise.race(iterable)` method returns a promise that resolves or rejects | ||
- ### **[Yaku.all(iterable)](src/yaku.js?source#L268)** | ||
- ### **[Yaku.all(iterable)](src/yaku.js?source#L270)** | ||
@@ -411,3 +411,3 @@ The `Promise.all(iterable)` method returns a promise that resolves when | ||
- ### **[Yaku.Symbol](src/yaku.js?source#L304)** | ||
- ### **[Yaku.Symbol](src/yaku.js?source#L306)** | ||
@@ -427,3 +427,3 @@ The ES6 Symbol object that Yaku should use, by default it will use the | ||
- ### **[Yaku.speciesConstructor(O, defaultConstructor)](src/yaku.js?source#L319)** | ||
- ### **[Yaku.speciesConstructor(O, defaultConstructor)](src/yaku.js?source#L321)** | ||
@@ -439,3 +439,3 @@ Use this api to custom the species behavior. | ||
- ### **[Yaku.unhandledRejection(reason, p)](src/yaku.js?source#L345)** | ||
- ### **[Yaku.unhandledRejection(reason, p)](src/yaku.js?source#L347)** | ||
@@ -442,0 +442,0 @@ Catch all possibly unhandled rejections. If you want to use specific |
142539
2546