rxjs-tracer
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -1,19 +0,19 @@ | ||
function u(z){function H(){try{return A.apply(this,arguments)}catch(b){return B.f.e=b,B.f}}function v(b){"object"!==typeof b||b.__id||(b.__id="id"+I++);var a;a=h[b.__id]?h[b.__id].data:{name:b.constructor.name.replace("Observable","$")};var c=new J(a);"object"===typeof b?(h[b.__id]||(h[b.__id]=new K(b,a)),c.id=b.__id):a.value=b;b.O&&(a.value=b.value);b.operator&&(a.S=b.operator.constructor.name.replace("Operator",""));b.source&&(a=v(b.source),c.I(a));b.array&&b.array.forEach(function(a){a=v(a);c.I(a); | ||
return a});return c}var g="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{},l=function(b,a){return a={K:{}},b(a,a.K),a.K}(function(b,a){a.root="object"==typeof window&&window.window===window&&window||"object"==typeof self&&self.self===self&&self||"object"==typeof g&&g.global===g&&g;if(!a.root)throw Error("RxJS could not find any global context (window, self, global)");}),w={B:function(b){return"function"===typeof b}},L={isArray:Array.isArray|| | ||
function(b){return b&&"number"===typeof b.length}},m={f:{e:{}}},B=m,A,M=g&&g.m||function(b,a){function c(){this.constructor=b}for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)},N={R:function(b){return null!=b&&"object"===typeof b}},C={N:function(b){A=b;return H}},D=function(b){function a(a){b.call(this);this.P=a;a=Error.call(this,a?a.length+" errors occurred during unsubscription:\n "+a.map(function(a,c){return c+1+") "+a.toString()}).join("\n "): | ||
"");this.name=a.name="UnsubscriptionError";this.stack=a.stack;this.message=a.message}M(a,b);return a}(Error),n=function(){function b(a){this.closed=!1;a&&(this.H=a)}b.prototype.unsubscribe=function(){var a=!1,c;if(!this.closed){this.closed=!0;var b=this.H,f=this.s;this.s=null;if(w.B(b)){var e=C.N(b).call(this);e===m.f&&(a=!0,(c=c||[]).push(m.f.e))}if(L.isArray(f))for(var b=-1,g=f.length;++b<g;)e=f[b],N.R(e)&&(e=C.N(e.unsubscribe).call(e),e===m.f&&(a=!0,c=c||[],e=m.f.e,e instanceof D?c=c.concat(e.P): | ||
function t(z){function I(){try{return A.apply(this,arguments)}catch(b){return B.g.e=b,B.g}}function u(b){"object"!==typeof b||b.__id||(b.__id="id"+J++);var a;a=g[b.__id]?g[b.__id].data:{name:b.constructor.name.replace("Observable","$")};var c=new K(a);"object"===typeof b?(g[b.__id]||(g[b.__id]=new L(b,a)),c.id=b.__id):a.value=b;b.O&&(a.value=b.value);b.operator&&(a.S=b.operator.constructor.name.replace("Operator",""));b.source&&(a=u(b.source),c.H(a));b.array&&b.array.forEach(function(a){a=u(a);c.H(a); | ||
return a});return c}var h="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{},l=function(b,a){return a={J:{}},b(a,a.J),a.J}(function(b,a){a.root="object"==typeof window&&window.window===window&&window||"object"==typeof self&&self.self===self&&self||"object"==typeof h&&h.global===h&&h;if(!a.root)throw Error("RxJS could not find any global context (window, self, global)");}),v={B:function(b){return"function"===typeof b}},M={isArray:Array.isArray|| | ||
function(b){return b&&"number"===typeof b.length}},m={g:{e:{}}},B=m,A,N=h&&h.m||function(b,a){function c(){this.constructor=b}for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)},O={R:function(b){return null!=b&&"object"===typeof b}},C={N:function(b){A=b;return I}},D=function(b){function a(a){b.call(this);this.P=a;a=Error.call(this,a?a.length+" errors occurred during unsubscription:\n "+a.map(function(a,c){return c+1+") "+a.toString()}).join("\n "): | ||
"");this.name=a.name="UnsubscriptionError";this.stack=a.stack;this.message=a.message}N(a,b);return a}(Error),n=function(){function b(a){this.closed=!1;a&&(this.G=a)}b.prototype.unsubscribe=function(){var a=!1,c;if(!this.closed){this.closed=!0;var b=this.G,f=this.s;this.s=null;if(v.B(b)){var e=C.N(b).call(this);e===m.g&&(a=!0,(c=c||[]).push(m.g.e))}if(M.isArray(f))for(var b=-1,g=f.length;++b<g;)e=f[b],O.R(e)&&(e=C.N(e.unsubscribe).call(e),e===m.g&&(a=!0,c=c||[],e=m.g.e,e instanceof D?c=c.concat(e.P): | ||
c.push(e)));if(a)throw new D(c);}};b.prototype.add=function(a){if(!a||a===b.EMPTY)return b.EMPTY;if(a===this)return this;var c=a;switch(typeof a){case "function":c=new b(a);case "object":c.closed||"function"!==typeof c.unsubscribe||(this.closed?c.unsubscribe():(this.s||(this.s=[])).push(c));break;default:throw Error("unrecognized teardown "+a+" added to Subscription.");}return c};b.prototype.remove=function(a){if(null!=a&&a!==this&&a!==b.EMPTY){var c=this.s;c&&(a=c.indexOf(a),-1!==a&&c.splice(a,1))}}; | ||
b.EMPTY=function(a){a.closed=!0;return a}(new b);return b}(),x={closed:!0,next:function(){},error:function(b){throw b;},complete:function(){}},k=l.root.Symbol,r="function"===typeof k&&"function"===typeof k.for?k.for("rxSubscriber"):"@@rxSubscriber",E=g&&g.m||function(b,a){function c(){this.constructor=b}for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)},p=function(b){function a(c,d,f){b.call(this);this.G=null;this.a=this.b=this.F= | ||
!1;switch(arguments.length){case 0:this.destination=x;break;case 1:if(!c){this.destination=x;break}if("object"===typeof c){c instanceof a?(this.destination=c,this.destination.add(this)):(this.b=!0,this.destination=new F(this,c));break}default:this.b=!0,this.destination=new F(this,c,d,f)}}E(a,b);a.prototype[r]=function(){return this};a.create=function(c,b,f){c=new a(c,b,f);c.b=!1;return c};a.prototype.next=function(a){this.a||this.i(a)};a.prototype.error=function(a){this.a||(this.a=!0,this.h(a))}; | ||
a.prototype.complete=function(){this.a||(this.a=!0,this.g())};a.prototype.unsubscribe=function(){this.closed||(this.a=!0,b.prototype.unsubscribe.call(this))};a.prototype.i=function(a){this.destination.next(a)};a.prototype.h=function(a){this.destination.error(a);this.unsubscribe()};a.prototype.g=function(){this.destination.complete();this.unsubscribe()};return a}(n),F=function(b){function a(a,d,f,e){b.call(this);this.j=a;var c;a=this;w.B(d)?c=d:d&&(a=d,c=d.next,f=d.error,e=d.complete,w.B(a.unsubscribe)&& | ||
this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this));this.A=a;this.i=c;this.h=f;this.g=e}E(a,b);a.prototype.next=function(a){if(!this.a&&this.i){var b=this.j;b.b?this.v(b,this.i,a)&&this.unsubscribe():this.w(this.i,a)}};a.prototype.error=function(a){if(!this.a){var b=this.j;if(this.h)b.b?this.v(b,this.h,a):this.w(this.h,a),this.unsubscribe();else if(b.b)b.G=a,b.F=!0,this.unsubscribe();else throw this.unsubscribe(),a;}};a.prototype.complete=function(){if(!this.a){var a=this.j; | ||
this.g&&(a.b?this.v(a,this.g):this.w(this.g));this.unsubscribe()}};a.prototype.w=function(a,b){try{a.call(this.A,b)}catch(f){throw this.unsubscribe(),f;}};a.prototype.v=function(a,b,f){try{b.call(this.A,f)}catch(e){return a.G=e,a.F=!0}return!1};a.prototype.H=function(){var a=this.j;this.j=this.A=null;a.unsubscribe()};return a}(p),O=function(b){var a=b.Symbol;"function"===typeof a?a.C?b=a.C:(b=a("observable"),a.C=b):b="@@observable";return b}(l.root),P={V:function(b,a,c){if(b){if(b instanceof p)return b; | ||
if(b[r])return b[r]()}return b||a||c?new p(b,a,c):new p(x)}},k=function(){function b(a){this.O=!1;a&&(this.o=a)}b.prototype.subscribe=function(a,b,d){var c=this.S;a=P.V(a,b,d);c?c.call(a,this):a.add(this.o(a));if(a.b&&(a.b=!1,a.F))throw a.G;return a};b.prototype.forEach=function(a,b){var c=this;b||(l.root.u&&l.root.u.J&&l.root.u.J.Promise?b=l.root.u.J.Promise:l.root.Promise&&(b=l.root.Promise));if(!b)throw Error("no Promise impl found");return new b(function(b,d){var f=c.subscribe(function(b){if(f)try{a(b)}catch(Q){d(Q), | ||
f.unsubscribe()}else a(b)},d,b)})};b.prototype.o=function(a){return this.source.subscribe(a)};b.prototype[O]=function(){return this};b.create=function(a){return new b(a)};return b}(),R=g&&g.m||function(b,a){function c(){this.constructor=b}for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)},t=function(b){function a(){var a=b.call(this,"object unsubscribed");this.name=a.name="ObjectUnsubscribedError";this.stack=a.stack;this.message= | ||
a.message}R(a,b);return a}(Error),S=g&&g.m||function(b,a){function c(){this.constructor=b}for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)},U=function(b){function a(a,d){b.call(this);this.l=a;this.U=d;this.closed=!1}S(a,b);a.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var a=this.l,b=a.c;this.l=null;!b||0===b.length||a.a||a.closed||(a=b.indexOf(this.U),-1!==a&&b.splice(a,1))}};return a}(n),y=g&&g.m||function(b, | ||
a){function c(){this.constructor=b}for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)},V=function(b){function a(a){b.call(this,a);this.destination=a}y(a,b);return a}(p),q=function(b){function a(){b.call(this);this.c=[];this.L=this.a=this.closed=!1;this.M=null}y(a,b);a.prototype[r]=function(){return new V(this)};a.prototype.next=function(a){if(this.closed)throw new t;if(!this.a)for(var b=this.c,c=b.length,b=b.slice(),e=0;e<c;e++)b[e].next(a)}; | ||
a.prototype.error=function(a){if(this.closed)throw new t;this.L=!0;this.M=a;this.a=!0;for(var b=this.c,c=b.length,b=b.slice(),e=0;e<c;e++)b[e].error(a);this.c.length=0};a.prototype.complete=function(){if(this.closed)throw new t;this.a=!0;for(var a=this.c,b=a.length,a=a.slice(),f=0;f<b;f++)a[f].complete();this.c.length=0};a.prototype.unsubscribe=function(){this.closed=this.a=!0;this.c=null};a.prototype.o=function(a){if(this.closed)throw new t;if(this.L)return a.error(this.M),n.EMPTY;if(this.a)return a.complete(), | ||
n.EMPTY;this.c.push(a);return new U(this,a)};a.create=function(a,b){return new W(a,b)};return a}(k),W=function(b){function a(a,d){b.call(this);this.destination=a;this.source=d}y(a,b);a.prototype.next=function(a){var b=this.destination;b&&b.next&&b.next(a)};a.prototype.error=function(a){var b=this.destination;b&&b.error&&this.destination.error(a)};a.prototype.complete=function(){var a=this.destination;a&&a.complete&&this.destination.complete()};a.prototype.o=function(a){return this.source?this.source.subscribe(a): | ||
n.EMPTY};return a}(q),K=function(){function b(a,b){this.C=a;this.data=b}b.prototype.D=function(a){this.data.value=a;this.l&&(a=this.W.raw(),this.l.next(a))};return b}(),J=function(){function b(a){this.data=a;this.children=[]}b.prototype.I=function(a){this.children.push(a)};b.prototype.value=function(){return this.children&&0<=this.children.length?1===this.children.length?this.data.value:this.children.map(function(a){return a.value()}):this.data.value};b.prototype.raw=function(){var a={id:this.id, | ||
value:this.value()};this.children&&0<this.children.length&&(a.children=this.children.map(function(a){return a.raw()}));return a};return b}(),G=new q,q="undefined"===typeof global?window:global;q.Observable=k;q.RxTrackerData=G;var h={},I=0,k=k.prototype,X=k.subscribe;k.subscribe=function(b,a,c){var d=this.X,f=[].slice.call(arguments);if(b)if("function"===typeof b){var e=b;b=function(){h[d]&&h[d].D(arguments[0]);e.apply(this,arguments)};f[0]=b}else{if(0<b.constructor.name.indexOf("Subscriber")&&0>this.constructor.name.indexOf("Array")){var g= | ||
b.next;b.next=function(){h[d]&&h[d].D(arguments[0]);g.apply(b,arguments)}}}else f=[function(a){h[d]&&h[d].D(a)}];return X.apply(this,f)};z.Z=function(b){var a=v(b);h[b.__id].W=a;return h[b.__id].l=G};Object.defineProperty(z,"__esModule",{value:!0})}"object"===typeof exports&&"undefined"!==typeof module?u(exports):"function"===typeof define&&define.Y?define(["exports"],u):u(this.T=this.T||{}); | ||
b.EMPTY=function(a){a.closed=!0;return a}(new b);return b}(),w={closed:!0,next:function(){},error:function(b){throw b;},complete:function(){}},k=l.root.Symbol,q="function"===typeof k&&"function"===typeof k.for?k.for("rxSubscriber"):"@@rxSubscriber",E=h&&h.m||function(b,a){function c(){this.constructor=b}for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)},p=function(b){function a(c,d,f){b.call(this);this.F=null;this.a=this.b=this.D= | ||
!1;switch(arguments.length){case 0:this.destination=w;break;case 1:if(!c){this.destination=w;break}if("object"===typeof c){c instanceof a?(this.destination=c,this.destination.add(this)):(this.b=!0,this.destination=new F(this,c));break}default:this.b=!0,this.destination=new F(this,c,d,f)}}E(a,b);a.prototype[q]=function(){return this};a.create=function(c,b,f){c=new a(c,b,f);c.b=!1;return c};a.prototype.next=function(a){this.a||this.j(a)};a.prototype.error=function(a){this.a||(this.a=!0,this.i(a))}; | ||
a.prototype.complete=function(){this.a||(this.a=!0,this.h())};a.prototype.unsubscribe=function(){this.closed||(this.a=!0,b.prototype.unsubscribe.call(this))};a.prototype.j=function(a){this.destination.next(a)};a.prototype.i=function(a){this.destination.error(a);this.unsubscribe()};a.prototype.h=function(){this.destination.complete();this.unsubscribe()};return a}(n),F=function(b){function a(a,d,f,e){b.call(this);this.l=a;var c;a=this;v.B(d)?c=d:d&&(a=d,c=d.next,f=d.error,e=d.complete,v.B(a.unsubscribe)&& | ||
this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this));this.A=a;this.j=c;this.i=f;this.h=e}E(a,b);a.prototype.next=function(a){if(!this.a&&this.j){var b=this.l;b.b?this.v(b,this.j,a)&&this.unsubscribe():this.w(this.j,a)}};a.prototype.error=function(a){if(!this.a){var b=this.l;if(this.i)b.b?this.v(b,this.i,a):this.w(this.i,a),this.unsubscribe();else if(b.b)b.F=a,b.D=!0,this.unsubscribe();else throw this.unsubscribe(),a;}};a.prototype.complete=function(){if(!this.a){var a=this.l; | ||
this.h&&(a.b?this.v(a,this.h):this.w(this.h));this.unsubscribe()}};a.prototype.w=function(a,b){try{a.call(this.A,b)}catch(f){throw this.unsubscribe(),f;}};a.prototype.v=function(a,b,f){try{b.call(this.A,f)}catch(e){return a.F=e,a.D=!0}return!1};a.prototype.G=function(){var a=this.l;this.l=this.A=null;a.unsubscribe()};return a}(p),P=function(b){var a=b.Symbol;"function"===typeof a?a.L?b=a.L:(b=a("observable"),a.L=b):b="@@observable";return b}(l.root),Q={V:function(b,a,c){if(b){if(b instanceof p)return b; | ||
if(b[q])return b[q]()}return b||a||c?new p(b,a,c):new p(w)}},k=function(){function b(a){this.O=!1;a&&(this.o=a)}b.prototype.subscribe=function(a,b,d){var c=this.S;a=Q.V(a,b,d);c?c.call(a,this):a.add(this.o(a));if(a.b&&(a.b=!1,a.D))throw a.F;return a};b.prototype.forEach=function(a,b){var c=this;b||(l.root.u&&l.root.u.I&&l.root.u.I.Promise?b=l.root.u.I.Promise:l.root.Promise&&(b=l.root.Promise));if(!b)throw Error("no Promise impl found");return new b(function(b,d){var f=c.subscribe(function(b){if(f)try{a(b)}catch(R){d(R), | ||
f.unsubscribe()}else a(b)},d,b)})};b.prototype.o=function(a){return this.source.subscribe(a)};b.prototype[P]=function(){return this};b.create=function(a){return new b(a)};return b}(),S=h&&h.m||function(b,a){function c(){this.constructor=b}for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)},r=function(b){function a(){var a=b.call(this,"object unsubscribed");this.name=a.name="ObjectUnsubscribedError";this.stack=a.stack;this.message= | ||
a.message}S(a,b);return a}(Error),U=h&&h.m||function(b,a){function c(){this.constructor=b}for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)},V=function(b){function a(a,d){b.call(this);this.f=a;this.U=d;this.closed=!1}U(a,b);a.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var a=this.f,b=a.c;this.f=null;!b||0===b.length||a.a||a.closed||(a=b.indexOf(this.U),-1!==a&&b.splice(a,1))}};return a}(n),x=h&&h.m||function(b, | ||
a){function c(){this.constructor=b}for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)},W=function(b){function a(a){b.call(this,a);this.destination=a}x(a,b);return a}(p),y=function(b){function a(){b.call(this);this.c=[];this.K=this.a=this.closed=!1;this.M=null}x(a,b);a.prototype[q]=function(){return new W(this)};a.prototype.next=function(a){if(this.closed)throw new r;if(!this.a)for(var b=this.c,c=b.length,b=b.slice(),e=0;e<c;e++)b[e].next(a)}; | ||
a.prototype.error=function(a){if(this.closed)throw new r;this.K=!0;this.M=a;this.a=!0;for(var b=this.c,c=b.length,b=b.slice(),e=0;e<c;e++)b[e].error(a);this.c.length=0};a.prototype.complete=function(){if(this.closed)throw new r;this.a=!0;for(var a=this.c,b=a.length,a=a.slice(),f=0;f<b;f++)a[f].complete();this.c.length=0};a.prototype.unsubscribe=function(){this.closed=this.a=!0;this.c=null};a.prototype.o=function(a){if(this.closed)throw new r;if(this.K)return a.error(this.M),n.EMPTY;if(this.a)return a.complete(), | ||
n.EMPTY;this.c.push(a);return new V(this,a)};a.create=function(a,b){return new X(a,b)};return a}(k),X=function(b){function a(a,d){b.call(this);this.destination=a;this.source=d}x(a,b);a.prototype.next=function(a){var b=this.destination;b&&b.next&&b.next(a)};a.prototype.error=function(a){var b=this.destination;b&&b.error&&this.destination.error(a)};a.prototype.complete=function(){var a=this.destination;a&&a.complete&&this.destination.complete()};a.prototype.o=function(a){return this.source?this.source.subscribe(a): | ||
n.EMPTY};return a}(y),L=function(){function b(a,b){this.source=a;this.data=b}b.prototype.C=function(a){this.data.value=a;this.f&&(a=this.W.raw(),this.f.next(a))};return b}(),K=function(){function b(a){this.data=a;this.children=[]}b.prototype.H=function(a){this.children.push(a)};b.prototype.value=function(){return this.children&&0<=this.children.length?1===this.children.length?this.data.value:this.children.map(function(a){return a.value()}):this.data.value};b.prototype.raw=function(){var a={id:this.id, | ||
value:this.value()};this.children&&0<this.children.length&&(a.children=this.children.map(function(a){return a.raw()}));return a};return b}(),G=new y,H="undefined"===typeof global?window:global;H.Observable=k;H.RxTrackerData=G;var g={},J=0,k=k.prototype,Y=k.subscribe;k.subscribe=function(b,a,c){var d=this.X,f=[].slice.call(arguments);if(b)if("function"===typeof b){var e=b;b=function(){g[d]&&g[d].C(arguments[0]);e.apply(this,arguments)};f[0]=b}else{if(0<b.constructor.name.indexOf("Subscriber")&&0>this.constructor.name.indexOf("Array")){var h= | ||
b.next;b.next=function(){g[d]&&g[d].C(arguments[0]);h.apply(b,arguments)}}}else f=[function(a){g[d]&&g[d].C(a)}];return Y.apply(this,f)};z.Z=function(b){var a=u(b);g[b.__id].W=a;g[b.__id].f=new y;g[b.__id].f.subscribe(G);return g[b.__id].f};Object.defineProperty(z,"__esModule",{value:!0})}"object"===typeof exports&&"undefined"!==typeof module?t(exports):"function"===typeof define&&define.Y?define(["exports"],t):t(this.T=this.T||{}); |
@@ -959,3 +959,3 @@ (function (global, factory) { | ||
function Tracker(observable, data) { | ||
this.observable = observable; | ||
this.source = observable; | ||
this.data = data; | ||
@@ -1066,9 +1066,9 @@ } | ||
// 目前只支持跟踪一个Observable | ||
// 跟踪出来的数据结构是树的形式,并且,每个节点上都计算好了纵向的深度,还有横向的位置信息 | ||
// 直接用缩放比例代入就可以展示成图形了,或者不用这些信息,只用层级结构展示成树也行 | ||
// 跟踪出来的数据结构是树的形式,可以直接拿去展示成树 | ||
function traceRx(o) { | ||
var root = trace(o); | ||
trackerMap[o['__id']].tree = root; | ||
trackerMap[o['__id']].subject = subject$; | ||
return subject$; | ||
trackerMap[o['__id']].subject = new Subject_2(); | ||
trackerMap[o['__id']].subject.subscribe(subject$); | ||
return trackerMap[o['__id']].subject; | ||
} | ||
@@ -1075,0 +1075,0 @@ function trace(o) { |
@@ -57,9 +57,9 @@ "use strict"; | ||
// 目前只支持跟踪一个Observable | ||
// 跟踪出来的数据结构是树的形式,并且,每个节点上都计算好了纵向的深度,还有横向的位置信息 | ||
// 直接用缩放比例代入就可以展示成图形了,或者不用这些信息,只用层级结构展示成树也行 | ||
// 跟踪出来的数据结构是树的形式,可以直接拿去展示成树 | ||
function traceRx(o) { | ||
var root = trace(o); | ||
trackerMap[o['__id']].tree = root; | ||
trackerMap[o['__id']].subject = subject$; | ||
return subject$; | ||
trackerMap[o['__id']].subject = new Subject_1.Subject(); | ||
trackerMap[o['__id']].subject.subscribe(subject$); | ||
return trackerMap[o['__id']].subject; | ||
} | ||
@@ -66,0 +66,0 @@ exports.traceRx = traceRx; |
@@ -5,3 +5,3 @@ import { Observable } from 'rxjs/Observable'; | ||
export declare class Tracker { | ||
observable: Observable<any>; | ||
source: Observable<any>; | ||
data: any; | ||
@@ -8,0 +8,0 @@ subject?: Subject<any>; |
@@ -9,3 +9,3 @@ "use strict"; | ||
function Tracker(observable, data) { | ||
this.observable = observable; | ||
this.source = observable; | ||
this.data = data; | ||
@@ -12,0 +12,0 @@ } |
@@ -56,9 +56,9 @@ import { Observable } from 'rxjs/Observable'; | ||
// 目前只支持跟踪一个Observable | ||
// 跟踪出来的数据结构是树的形式,并且,每个节点上都计算好了纵向的深度,还有横向的位置信息 | ||
// 直接用缩放比例代入就可以展示成图形了,或者不用这些信息,只用层级结构展示成树也行 | ||
// 跟踪出来的数据结构是树的形式,可以直接拿去展示成树 | ||
export function traceRx(o) { | ||
var root = trace(o); | ||
trackerMap[o['__id']].tree = root; | ||
trackerMap[o['__id']].subject = subject$; | ||
return subject$; | ||
trackerMap[o['__id']].subject = new Subject(); | ||
trackerMap[o['__id']].subject.subscribe(subject$); | ||
return trackerMap[o['__id']].subject; | ||
} | ||
@@ -65,0 +65,0 @@ function trace(o) { |
@@ -5,3 +5,3 @@ import { Observable } from 'rxjs/Observable'; | ||
export declare class Tracker { | ||
observable: Observable<any>; | ||
source: Observable<any>; | ||
data: any; | ||
@@ -8,0 +8,0 @@ subject?: Subject<any>; |
@@ -8,3 +8,3 @@ // 有一个 Observable 就会有一个 Tracker,里面记录它的 Observable 和 Observable 当前数据 | ||
function Tracker(observable, data) { | ||
this.observable = observable; | ||
this.source = observable; | ||
this.data = data; | ||
@@ -11,0 +11,0 @@ } |
{ | ||
"name": "rxjs-tracer", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "A simple RxJS data tracer", | ||
@@ -5,0 +5,0 @@ "author": "xufei <xu.fei@outlook.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114663