Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rx-lite-extras

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rx-lite-extras - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Lightweight library extras for composing asynchronous and event-based operations in JavaScript",
"version": "3.0.1",
"version": "3.1.0",
"homepage": "https://github.com/Reactive-Extensions/RxJS",

@@ -8,0 +8,0 @@ "author": {

@@ -21,3 +21,3 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

if (typeof define === 'function' && define.amd) {
define(['rx-lite'], function (Rx, exports) {
define(['./rx.lite'], function (Rx, exports) {
return factory(root, exports, Rx);

@@ -651,3 +651,3 @@ });

return Rx;
return Rx;
}));
/* 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(){try{return o.apply(this,arguments)}catch(a){return S.e=a,S}}function f(a){if(!M(a))throw new TypeError("fn must be a function");return o=a,e}function g(a){throw a}function h(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function i(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function j(a,b){return a.amb(b)}function k(a){return a.toArray()}function l(a){return a.length>0}function m(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function n(a){this.comparer=a,this.set=[]}var o,p=c.Observable,q=p.prototype,r=p.never,s=p["throw"],t=c.AnonymousObservable,u=c.AnonymousObserver,v=c.Notification.createOnNext,w=c.Notification.createOnError,x=c.Notification.createOnCompleted,y=c.Observer,z=y.create,A=c.Subject,B=c.internals,C=c.helpers,D=B.ScheduledObserver,E=c.SerialDisposable,F=c.SingleAssignmentDisposable,G=c.CompositeDisposable,H=c.RefCountDisposable,I=c.Disposable.empty,J=c.Scheduler.immediate,K=(C.defaultKeySerializer,c.internals.addRef),L=(C.identity,C.isPromise),M=C.isFunction,N=B.inherits,O=B.bindCallback,P=(C.noop,c.Scheduler.isScheduler),Q=p.fromPromise,R=c.ArgumentOutOfRangeError,S={e:{}};h.prototype.dispose=function(){this.scheduler.scheduleWithState(this,i)};var T=function(a){function b(b){a.call(this),this._observer=b,this._state=0}N(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();var b=f(this._observer.onNext).call(this._observer,a);this._state=0,b===S&&g(b.e)},c.onError=function(a){this.checkAccess();var b=f(this._observer.onError).call(this._observer,a);this._state=2,b===S&&g(b.e)},c.onCompleted=function(){this.checkAccess();var a=f(this._observer.onCompleted).call(this._observer);this._state=2,a===S&&g(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(y),U=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return N(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(D);y.prototype.checked=function(){return new T(this)},y.notifyOn=function(a){return new U(a,this)},y.fromNotifier=function(a,b){var c=O(a,b,1);return new u(function(a){return c(v(a))},function(a){return c(w(a))},function(){return c(x())})},y.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},y.prototype.asObserver=function(){var a=this;return new u(function(b){a.onNext(b)},function(b){a.onError(b)},function(){a.onCompleted()})},q.observeOn=function(a){var b=this;return new t(function(c){return b.subscribe(new U(a,c))},b)},q.subscribeOn=function(a){var b=this;return new t(function(c){var d=new F,e=new E;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new h(a,b.subscribe(c)))})),e},b)},p.generate=function(a,b,c,d,e){return P(e)||(e=currentThreadScheduler),new t(function(f){var g=!0;return e.scheduleRecursiveWithState(a,function(a,e){var h,i;try{g?g=!1:a=c(a),h=b(a),h&&(i=d(a))}catch(j){return f.onError(j)}h?(f.onNext(i),e(a)):f.onCompleted()})})},p.using=function(a,b){return new t(function(c){var d=I,e=f(a)();if(e===S)return new G(s(e.e).subscribe(c),d);e&&(d=e);var g=f(b)(e);return g===S?new G(s(g.e).subscribe(c),d):new G(g.subscribe(c),d)})},q.amb=function(a){var b=this;return new t(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new F,j=new F;L(a)&&(a=Q(a));var k=z(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()}),l=z(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()});return i.setDisposable(b.subscribe(k)),j.setDisposable(a.subscribe(l)),new G(i,j)})},p.amb=function(){var a,b=r();if(Array.isArray(arguments[0]))a=arguments[0];else{var c=arguments.length;a=new Array(a);for(var d=0;c>d;d++)a[d]=arguments[d]}for(var d=0,c=a.length;c>d;d++)b=j(b,a[d]);return b},q.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return V([this,a])};var V=p.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new t(function(b){var c=0,d=new E,e=J.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],L(f)&&(f=Q(f)),g=new F,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new G(d,e)})};return q.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).flatMap(k).filter(l)},q.windowWithCount=function(a,b){var c=this;if(+a||(a=0),Math.abs(a)===1/0&&(a=0),0>=a)throw new R;if(null==b&&(b=a),+b||(b=0),Math.abs(b)===1/0&&(b=0),0>=b)throw new R;return new t(function(d){function e(){var a=new A;i.push(a),d.onNext(K(a,g))}var f=new F,g=new H(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},q.takeLastBuffer=function(a){var b=this;return new t(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},q.defaultIfEmpty=function(a){var b=this;return a===d&&(a=null),new t(function(c){var d=!1;return b.subscribe(function(a){d=!0,c.onNext(a)},function(a){c.onError(a)},function(){!d&&c.onNext(a),c.onCompleted()})},b)},n.prototype.push=function(a){var b=-1===m(this.set,a,this.comparer);return b&&this.set.push(a),b},q.distinct=function(a,b){var c=this;return b||(b=defaultComparer),new t(function(d){var e=new n(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},function(a){d.onError(a)},function(){d.onCompleted()})},this)},q.singleInstance=function(){function a(){return d||(d=!0,b=c["finally"](function(){d=!1}).publish().refCount()),b}var b,c=this,d=!1;return new t(function(b){return a().subscribe(b)})},c});
(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(){try{return o.apply(this,arguments)}catch(a){return S.e=a,S}}function f(a){if(!M(a))throw new TypeError("fn must be a function");return o=a,e}function g(a){throw a}function h(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function i(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function j(a,b){return a.amb(b)}function k(a){return a.toArray()}function l(a){return a.length>0}function m(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function n(a){this.comparer=a,this.set=[]}var o,p=c.Observable,q=p.prototype,r=p.never,s=p["throw"],t=c.AnonymousObservable,u=c.AnonymousObserver,v=c.Notification.createOnNext,w=c.Notification.createOnError,x=c.Notification.createOnCompleted,y=c.Observer,z=y.create,A=c.Subject,B=c.internals,C=c.helpers,D=B.ScheduledObserver,E=c.SerialDisposable,F=c.SingleAssignmentDisposable,G=c.CompositeDisposable,H=c.RefCountDisposable,I=c.Disposable.empty,J=c.Scheduler.immediate,K=(C.defaultKeySerializer,c.internals.addRef),L=(C.identity,C.isPromise),M=C.isFunction,N=B.inherits,O=B.bindCallback,P=(C.noop,c.Scheduler.isScheduler),Q=p.fromPromise,R=c.ArgumentOutOfRangeError,S={e:{}};h.prototype.dispose=function(){this.scheduler.scheduleWithState(this,i)};var T=function(a){function b(b){a.call(this),this._observer=b,this._state=0}N(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();var b=f(this._observer.onNext).call(this._observer,a);this._state=0,b===S&&g(b.e)},c.onError=function(a){this.checkAccess();var b=f(this._observer.onError).call(this._observer,a);this._state=2,b===S&&g(b.e)},c.onCompleted=function(){this.checkAccess();var a=f(this._observer.onCompleted).call(this._observer);this._state=2,a===S&&g(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(y),U=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return N(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(D);y.prototype.checked=function(){return new T(this)},y.notifyOn=function(a){return new U(a,this)},y.fromNotifier=function(a,b){var c=O(a,b,1);return new u(function(a){return c(v(a))},function(a){return c(w(a))},function(){return c(x())})},y.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},y.prototype.asObserver=function(){var a=this;return new u(function(b){a.onNext(b)},function(b){a.onError(b)},function(){a.onCompleted()})},q.observeOn=function(a){var b=this;return new t(function(c){return b.subscribe(new U(a,c))},b)},q.subscribeOn=function(a){var b=this;return new t(function(c){var d=new F,e=new E;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new h(a,b.subscribe(c)))})),e},b)},p.generate=function(a,b,c,d,e){return P(e)||(e=currentThreadScheduler),new t(function(f){var g=!0;return e.scheduleRecursiveWithState(a,function(a,e){var h,i;try{g?g=!1:a=c(a),h=b(a),h&&(i=d(a))}catch(j){return f.onError(j)}h?(f.onNext(i),e(a)):f.onCompleted()})})},p.using=function(a,b){return new t(function(c){var d=I,e=f(a)();if(e===S)return new G(s(e.e).subscribe(c),d);e&&(d=e);var g=f(b)(e);return g===S?new G(s(g.e).subscribe(c),d):new G(g.subscribe(c),d)})},q.amb=function(a){var b=this;return new t(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new F,j=new F;L(a)&&(a=Q(a));var k=z(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()}),l=z(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()});return i.setDisposable(b.subscribe(k)),j.setDisposable(a.subscribe(l)),new G(i,j)})},p.amb=function(){var a,b=r();if(Array.isArray(arguments[0]))a=arguments[0];else{var c=arguments.length;a=new Array(a);for(var d=0;c>d;d++)a[d]=arguments[d]}for(var d=0,c=a.length;c>d;d++)b=j(b,a[d]);return b},q.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return V([this,a])};var V=p.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new t(function(b){var c=0,d=new E,e=J.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],L(f)&&(f=Q(f)),g=new F,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new G(d,e)})};return q.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).flatMap(k).filter(l)},q.windowWithCount=function(a,b){var c=this;if(+a||(a=0),Math.abs(a)===1/0&&(a=0),0>=a)throw new R;if(null==b&&(b=a),+b||(b=0),Math.abs(b)===1/0&&(b=0),0>=b)throw new R;return new t(function(d){function e(){var a=new A;i.push(a),d.onNext(K(a,g))}var f=new F,g=new H(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},q.takeLastBuffer=function(a){var b=this;return new t(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},q.defaultIfEmpty=function(a){var b=this;return a===d&&(a=null),new t(function(c){var d=!1;return b.subscribe(function(a){d=!0,c.onNext(a)},function(a){c.onError(a)},function(){!d&&c.onNext(a),c.onCompleted()})},b)},n.prototype.push=function(a){var b=-1===m(this.set,a,this.comparer);return b&&this.set.push(a),b},q.distinct=function(a,b){var c=this;return b||(b=defaultComparer),new t(function(d){var e=new n(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},function(a){d.onError(a)},function(){d.onCompleted()})},this)},q.singleInstance=function(){function a(){return d||(d=!0,b=c["finally"](function(){d=!1}).publish().refCount()),b}var b,c=this,d=!1;return new t(function(b){return a().subscribe(b)})},c});
//# sourceMappingURL=rx.lite.extras.map

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc