UNPKG

webappengine

Version:

A web application platform that can host multiple web apps running with Node.js.

3 lines 2.77 kB
/* 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){function e(a){return a?l.isObservable(a)?a:q(a)?l.fromPromise(a):j(a)||i(a)?s.call(this,a):r(a)?h.call(this,a):isArrayLike(a)||isIterable(a)?f.call(this,a):k(a)?g.call(this,a):a:a}function f(a){return l.from(a).map(e,this).toArray()}function g(a){function b(a,b){c[b]=d,g.push(new o(function(d){return a.subscribe(function(a){c[b]=a,d.onCompleted()})}))}for(var c=new a.constructor,f=Object.keys(a),g=[],h=0,i=f.length;i>h;h++){var j=f[h],k=e.call(this,a[j]);k&&l.isObservable(k)?b(k,j):c[j]=a[j]}return l.concat(g).startWith(c)}function h(a){var b=this;return new o(function(c){a.call(b,function(){var a=arguments[0],b=arguments[1];if(a)return c.onError(a);if(arguments.length>2){for(var d=[],e=1,f=arguments.length;f>e;e++)d.push(arguments[e]);b=d}c.onNext(b),c.onCompleted()})})}function i(a){return r(a.next)&&r(a["throw"])}function j(a){var b=a.constructor;return b?"GeneratorFunction"===b.name||"GeneratorFunction"===b.displayName?!0:i(b.prototype):!1}function k(a){return Object==a.constructor}var l=c.Observable,m=(l.prototype,l.fromPromise),n=l.throwError,o=c.AnonymousObservable,p=(c.AsyncSubject,c.Disposable.create,c.CompositeDisposable),q=(c.Scheduler.immediate,c.Scheduler["default"],c.Scheduler.isScheduler,c.helpers.isPromise),r=c.helpers.isFunction,s=l.spawn=function(){for(var a=arguments[0],b=this,c=[],d=1,f=arguments.length;f>d;d++)c.push(arguments[d]);return new o(function(d){function f(b){var c=tryCatch(a.next).call(a,b);return c===errorObj?d.onError(c.e):void h(c)}function g(b){var c=tryCatch(a.next).call(a,b);return c===errorObj?d.onError(c.e):void h(c)}function h(a){a.done&&(d.onNext(a.value),d.onCompleted());var c=e.call(b,a.value);l.isObservable(c)?i.add(c.subscribe(f,g)):g(new TypeError("type not supported"))}var i=new p;return r(a)&&(a=a.apply(b,c)),a&&r(a.next)?(f(),i):(d.onNext(a),d.onCompleted())})};return l.start=function(a,b,c){return observableToAsync(a,b,c)()},l.startAsync=function(a){var b;try{b=a()}catch(c){return n(c)}return m(b)},c}); //# sourceMappingURL=rx.lite.async.map