webappengine
Version:
A web application platform that can host multiple web apps running with Node.js.
3 lines • 3.23 kB
JavaScript
/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["rx-lite"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("rx-lite")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){var e=c.Observable,f=e.prototype,g=(c.AnonymousObservable,c.internals.AbstractObserver),h=(c.CompositeDisposable,c.Notification,c.Subject,c.Observer,c.Disposable.empty,c.Disposable.create,c.internals.inherits),i=(c.internals.addProperties,c.Scheduler.timeout),j=(c.Scheduler.currentThread,c.helpers.identity,c.Scheduler.isScheduler,c.helpers.isFunction,c.Disposable.checkDisposed,function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return i.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}h(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}h(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;i.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(g);return c}(e));ControlledObservable.prototype.stopAndWait=function(){return new j(this)};var k=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return i.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}h(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}h(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;i.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(g);return c}(e);return ControlledObservable.prototype.windowed=function(a){return new k(this,a)},f.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(String(b))&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a},c});
//# sourceMappingURL=rx.lite.backpressure.map