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

ix

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ix - npm Package Compare versions

Comparing version 1.0.0 to 1.0.2

src/core/internal/dictionary.js

9

Gruntfile.js

@@ -22,5 +22,2 @@ module.exports = function (grunt) {

concat: {
options: {
separator: ';'
},
basic: {

@@ -31,2 +28,5 @@ src: [

'src/core/basicheader.js',
'src/core/internal/inherits.js',
'src/core/internal/dictionary.js',
'src/core/internal/lookup.js',
'src/core/enumerator.js',

@@ -74,6 +74,7 @@ 'src/core/enumerable.js',

grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task(s).
grunt.registerTask('default', ['concat:basic', 'concat:ixJS', 'uglify:basic', 'uglify:ixJS', 'qunit']);
};
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
;(function (root, factory) {
(function (root, factory) {
var freeExports = typeof exports == 'object' && exports &&

@@ -18,3 +19,4 @@ (typeof root == 'object' && root && root == root.global && (window = root), exports);

}(this, function (global, exp, root, undefined) {
; function noop () { }
function noop () { }
function identity (x) { return x; }

@@ -45,3 +47,4 @@ function defaultComparer (x, y) { return x > y ? 1 : x < y ? -1 : 0; }

enumeratorCreate = root.Enumerator.create
inherits = root.internals.inherits;;
inherits = root.Internals.inherits;
/**

@@ -104,3 +107,4 @@ * Determines whether an enumerable sequence is empty.

return extremaBy(this, keySelector, comparer);
};;
};
var SharedBuffer = (function () {

@@ -464,3 +468,4 @@ inherits(SharedBuffer, Enumerable);

};
;
/**

@@ -558,3 +563,4 @@ * Returns a sequence that throws an exception upon enumeration.

};
; function functionBind(f, context) {
function functionBind(f, context) {
return function () {

@@ -920,3 +926,4 @@ f.apply(context, arguments);

};
; function catchExceptionHandler (source, handler) {
function catchExceptionHandler (source, handler) {
return new Enumerable(function () {

@@ -1152,3 +1159,4 @@ var current, e, errE;

});
};; /**
};
/**
* Generates an enumerable sequence by repeating a source sequence as long as the given loop condition holds.

@@ -1212,3 +1220,4 @@ * @param condition Loop condition.

};
; return root;
return root;
}));

@@ -1,1 +0,1 @@

(function(t,r){var e="object"==typeof exports&&exports&&("object"==typeof t&&t&&t==t.global&&(window=t),exports);"function"==typeof define&&define.amd?define(["Ix","exports"],function(e,n){return t.Ix=r(t,n,e),t.Ix}):"object"==typeof module&&module&&module.exports==e?module.exports=r(t,module.exports,require("./l2o")):t.Ix=r(t,{},t.Ix)})(this,function(t,r,e){function n(){}function u(t){return t}function o(t,r){return t>r?1:r>t?-1:0}function i(t,r){return t===r}function f(t,r){r||(r=i);for(var e=0,n=this.length;n>e;e++)if(r(t,this[e]))return e;return-1}function s(t,r,e){var n=[],u=t.getEnumerator();try{if(!u.moveNext())throw Error(m);var o=u.getCurrent(),i=r(o);for(n.push(o);u.moveNext();){var f=u.getCurrent(),s=r(f),c=e(s,i);0===c?n.push(f):c>0&&(n=[f],i=s)}}finally{u.dispose()}return w(n)}function c(t){this.readerCount=t,this.list={},this.length=0}function a(){this.list=[],this.length=0}function h(t,r){return function(){t.apply(r,arguments)}}function l(t,r){var e=this;return new d(function(){var n,u,o=t;return N(function(){if(u||(u=e.getEnumerator()),!u.moveNext())return!1;var t=u.getCurrent();return o=r(o,t),n=o,!0},function(){return n},function(){u&&u.dispose()})})}function p(t){var r=this;return new d(function(){var e,n,u,o=!1;return N(function(){for(n||(n=r.getEnumerator());;){if(!n.moveNext())return!1;var i=n.getCurrent();{if(o)return u=t(u,i),e=u,!0;o=!0,u=i}}},function(){return e},function(){n&&n.dispose()})})}function g(t,r){return new d(function(){var e,n,u;return N(function(){for(i||(i=t.getEnumerator());;){var n,o;try{n=i.moveNext(),o=i.getCurrent()}catch(i){u=r(i);break}return n?(e=o,!0):!1}return u?(i.dispose(),i=u.getEnumerator(),i.moveNext()?(e=i.getCurrent(),!0):!1):undefined},function(){return e},function(){n&&n.dispose()})})}var m="Sequence contains no elements.",v=Array.prototype.slice,d=e.Enumerable,y=d.prototype,E=d.concat,x=d.empty,w=d.fromArray,C=d.repeat,N=e.Enumerator.create;inherits=e.internals.inherits,y.isEmpty=function(){return!this.any()},y.minBy=function(t,r){return r||(r=o),s(this,t,function(t,e){return-r(t,e)})},y.maxBy=function(t,r){return r||(r=o),s(this,t,r)};var b=function(){function t(t){this.disposed=!1,this.source=t}return inherits(t,d),t.prototype.getEnumerator=function(){if(this.disposed)throw Error("Object disposed");var t,r=this;return N(function(){return r.source.moveNext()?(t=r.source.getCurrent(),!0):!1},function(){return t})},t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.source.dispose(),this.source=null)},t}();y.share=function(t){var r=this;return t?new d(function(){return t(r.share()).getEnumerator()}):new b(r.getEnumerator())};var k=c.prototype;k.clear=function(){this.list={},this.length=0},k.get=function(t){if(!this.list[t])throw Error("Element no longer available in the buffer.");var r=this.list[t];return 0===--r.length&&delete this.list[t],r.value},k.push=function(t){this.list[this.length]={value:t,length:this.readerCount},this.length++},k.done=function(t){for(var r=t;this.length>r;r++)this.get(r);this.readerCount--};var O=function(){function t(t){this.source=t,this.buffer=new c(0),this.disposed=!1,this.stopped=!1,this.error=null}function r(t){var r,e=this,n=!1,u=!0,o=!1;return N(function(){if(e.disposed)throw Error("Object disposed");u||t++;var i,f=!1;if(t>=e.buffer.length){if(!e.stopped)try{f=e.source.moveNext(),f&&(i=e.source.getCurrent())}catch(s){e.stopped=!0,e.error=s,e.source.dispose(),n=!0}if(e.stopped){if(e.error)throw e.buffer&&e.buffer.done(t+1),o=!0,e.error;return e.buffer&&e.buffer.done(t+1),o=!0,!1}f&&e.buffer.push(i)}else f=!0;return f?(r=e.buffer.get(t),u=!1,!0):(e.buffer&&e.buffer.done(t+1),o=!0,!1)},function(){return r},function(){o&&e.buffer&&e.buffer.done(t)})}return inherits(t,d),t.prototype.getEnumerator=function(){if(this.disposed)throw Error("Object disposed");var t=this.buffer.length;return this.buffer.readerCount++,r.call(this,t)},t.prototype.dispose=function(){this.disposed||(this.source.dispose(),this.source=null,this.buffer.clear(),this.buffer=null,this.disposed=!0)},t}();y.publish=function(t){var r=this;return t?new d(function(){return t(r.publish()).getEnumerator()}):new O(r.getEnumerator())};var A=a.prototype;A.done=n,A.push=function(t){this.list[this.length++]=t},A.clear=function(){this.list=[],this.length=0},A.get=function(t){return this.list[t]};var j=function(){function t(t,r){this.source=t,this.buffer=r,this.stopped=!1,this.error=null,this.disposed=!1}return inherits(t,d),t.prototype.getEnumerator=function(){if(this.disposed)throw Error("Object disposed");var t,r=0,e=this,n=!1,u=!0,o=!1;return N(function(){if(e.disposed)throw Error("Object disposed");u||r++;var i,f=!1;if(r>=e.buffer.length){if(!e.stopped)try{f=e.source.moveNext(),f&&(i=e.source.getCurrent())}catch(s){e.stopped=!0,e.error=s,e.source.dispose(),n=!0}if(e.stopped){if(e.error)throw e.buffer&&e.buffer.done(r+1),o=!0,e.error;return e.buffer&&e.buffer.done(r+1),o=!0,!1}f&&e.buffer.push(i)}else f=!0;return f?(t=e.buffer.get(r),u=!1,!0):(e.buffer&&e.buffer.done(r+1),o=!0,!1)},function(){return t},function(){o&&e.buffer&&e.buffer.done(r)})},t.prototype.dispose=function(){this.disposed||(this.source.dispose(),this.source=null,this.buffer.clear(),this.buffer=null,this.disposed=!0)},t}();y.memoize=function(){var t=this;return 0===arguments.length?new j(t.getEnumerator(),new a):1===arguments.length&&"function"==typeof arguments[0]?new d(function(){return arguments[1](t.memoize()).getEnumerator()}):1===arguments.length&&"number"==typeof arguments[0]?new j(t.getEnumerator(),new c(arguments[0])):new d(function(){return arguments[1](t.memoize(arguments[0])).getEnumerator()})},d.throwException=function(t){return new d(function(){return N(function(){throw t},n)})};var S=d.defer=function(t){return new d(function(){var r;return N(function(){return r||(r=t().getEnumerator()),r.moveNext()},function(){return r.getCurrent()},function(){r.dispose()})})};d.generate=function(t,r,e,n){return new d(function(){var u,o,i=!1;return N(function(){if(i){if(u=e(u),!r(u))return!1}else u=t,i=!0;return o=n(u),!0},function(){return o})})},d.using=function(t,r){return new d(function(){var e,n,u,o=!0;return N(function(){return o&&(u=t(),n=r(u).getEnumerator(),o=!1),n.moveNext()?(e=n.getCurrent(),!0):!1},function(){return e},function(){n&&n.dispose(),u&&u.dispose()})})},y.doAction=function(t,r,e){var u,o,i,f=this;return"object"==typeof t?(u=h(t.onNext,t),o=h(t.onError,t),i=h(t.onCompleted,t)):(u=t,o=r||n,i=e||n),new d(function(){var t,r;return N(function(){t||(t=f.getEnumerator());try{if(!t.moveNext())return i(),!1;r=t.getCurrent()}catch(t){throw o(t),t}return u(r),!0},function(){return r},function(){t&&t.dispose()})})},y.bufferWithCount=function(t,r){var e=this;return null==r&&(r=t),new d(function(){var n,u,o=[],i=0;return N(function(){for(n||(n=e.getEnumerator());;){if(!n.moveNext())return o.length>0?(u=d.fromArray(o.shift()),!0):!1;0===i%r&&o.push([]);for(var f=0,s=o.length;s>f;f++)o[f].push(n.getCurrent());if(o.length>0&&o[0].length===t)return u=d.fromArray(o.shift()),++i,!0;++i}},function(){return u},function(){n.dispose()})})},y.ignoreElements=function(){var t=this;return new d(function(){var r;return N(function(){for(r=t.getEnumerator();r.moveNext(););return!1},function(){throw Error("Operation is not valid due to the current state of the object.")},function(){r.dispose()})})},y.distinctBy=function(t,r){r||(r=i);var e=this;return new d(function(){var n,u,o=[];return N(function(){for(u||(u=e.getEnumerator());;){if(!u.moveNext())return!1;var i=u.getCurrent(),s=t(i);if(-1===f.call(o,s,r))return o.push(i),n=i,!0}},function(){return n},function(){u&&u.dispose()})})},y.distinctUntilChanged=function(t,r){t||(t=u),r||(r=i);var e=this;return new d(function(){var n,u,o,i;return N(function(){for(u||(u=e.getEnumerator());;){if(!u.moveNext())return!1;var f=u.getCurrent(),s=t(f),c=!1;if(i&&(c=r(o,s)),!i||!c)return n=f,o=s,i=!0,!0}},function(){return n},function(){u&&u.dispose()})})},y.expand=function(t){var r=this;return new d(function(){var e,n,u=[r];return N(function(){for(;;){if(!n){if(0===u.length)return!1;n=u.shift().getEnumerator()}if(n.moveNext())return e=n.getCurrent(),u.push(t(e)),!0;n.dispose(),n=null}},function(){return e},function(){n&&n.dispose()})})},y.startWith=function(){return E(w(v.call(arguments)),this)},y.scan=function(){var t=1===arguments.length?p:l;return t.apply(this,arguments)},y.takeLast=function(t){var r=this;return new d(function(){var e,n,u;return N(function(){if(n||(n=r.getEnumerator()),!u)for(u=[];n.moveNext();)u.push(n.getCurrent()),u.length>t&&u.shift();return 0===u.length?!1:(e=u.shift(),!0)},function(){return e},function(){n&&n.dispose()})})},y.skipLast=function(t){var r=this;return new d(function(){var e,n,u=[];return N(function(){for(n||(n=r.getEnumerator());;){if(!n.moveNext())return!1;if(u.push(n.getCurrent()),u.length>t)return e=u.shift(),!0}},function(){return e},function(){n&&n.dispose()})})},y.repeat=function(t){var r=this;return C(0,t).selectMany(function(){return r})},y.catchException=function(t){if(0===arguments.length)return q(this);if("function"==typeof t)return g(this,t);var r=v.call(arguments);return r.unshift(this),q.apply(null,r)};var q=d.catchException=function(){var t=d.fromArray(arguments);return new d(function(){var r,e,n,u;return N(function(){for(r||(r=t.getEnumerator());;){for(;;){if(!e){if(!r.moveNext()){if(u)throw u;return!1}u=null,e=r.getCurrent().getEnumerator()}var o,i;try{o=e.moveNext(),i=e.getCurrent()}catch(f){u=f,e.dispose(),e=null;break}if(!o){e.dispose(),e=null;break}return n=i,!0}if(null==u)break}},function(){return n},function(){e&&e.dispose(),r&&r.dispose()})})};y.finallyDo=function(t){var r=this;return new d(function(){var e,n=!1;return N(function(){u||(u=r.getEnumerator());var e;try{return e=u.moveNext(),e?e:(t(),n=!0,!1)}catch(u){throw t(),n=!0,u}},function(){return e.getCurrent()},function(){!n&&t(),e&&e.dispose()})})},y.onErrorResumeNext=function(t){return I.apply(null,[this,t])};var I=d.onErrorResumeNext=function(){var t=arguments;return new d(function(){var r,e,n=0;return N(function(){for(;t.length>n;){e||(e=t[n].getEnumerator());try{var u=e.moveNext();if(u)return r=e.getCurrent(),!0}catch(o){}e.dispose(),e=null,n++}return!1},function(){return r},function(){e&&e.dispose()})})};y.retry=function(t){var r=this;return new d(function(){var e,n,u=t,o=null!=t;return N(function(){for(n||(n=r.getEnumerator());;)try{return n.moveNext()?(e=n.getCurrent(),!0):!1}catch(t){if(o&&0===--u)throw t;n=r.getEnumerator(),error=null}},function(){return e},function(){n.dispose()})})};var D=d.whileDo=function(t,r){return C(r).takeWhile(t).selectMany(u)};return d.ifThen=function(t,r,e){return e||(e=x()),S(function(){return t()?r:e})},d.doWhile=function(t,r){return t.concat(D(r,t))},d.cases=function(t,r,e){return e||(e=x()),S(function(){var n=r[t()];return n||(n=e),n})},d.forIn=function(t,r){return t.select(r)},e});
(function(t,r){var e="object"==typeof exports&&exports&&("object"==typeof t&&t&&t==t.global&&(window=t),exports);"function"==typeof define&&define.amd?define(["Ix","exports"],function(e,n){return t.Ix=r(t,n,e),t.Ix}):"object"==typeof module&&module&&module.exports==e?module.exports=r(t,module.exports,require("./l2o")):t.Ix=r(t,{},t.Ix)})(this,function(t,r,e){function n(){}function u(t){return t}function i(t,r){return t>r?1:r>t?-1:0}function o(t,r){return t===r}function f(t,r){r||(r=o);for(var e=0,n=this.length;n>e;e++)if(r(t,this[e]))return e;return-1}function s(t,r,e){var n=[],u=t.getEnumerator();try{if(!u.moveNext())throw Error(m);var i=u.getCurrent(),o=r(i);for(n.push(i);u.moveNext();){var f=u.getCurrent(),s=r(f),c=e(s,o);0===c?n.push(f):c>0&&(n=[f],o=s)}}finally{u.dispose()}return x(n)}function c(t){this.readerCount=t,this.list={},this.length=0}function a(){this.list=[],this.length=0}function h(t,r){return function(){t.apply(r,arguments)}}function l(t,r){var e=this;return new y(function(){var n,u,i=t;return b(function(){if(u||(u=e.getEnumerator()),!u.moveNext())return!1;var t=u.getCurrent();return i=r(i,t),n=i,!0},function(){return n},function(){u&&u.dispose()})})}function v(t){var r=this;return new y(function(){var e,n,u,i=!1;return b(function(){for(n||(n=r.getEnumerator());;){if(!n.moveNext())return!1;var o=n.getCurrent();{if(i)return u=t(u,o),e=u,!0;i=!0,u=o}}},function(){return e},function(){n&&n.dispose()})})}function g(t,r){return new y(function(){var e,n,u;return b(function(){for(o||(o=t.getEnumerator());;){var n,i;try{n=o.moveNext(),i=o.getCurrent()}catch(o){u=r(o);break}return n?(e=i,!0):!1}return u?(o.dispose(),o=u.getEnumerator(),o.moveNext()?(e=o.getCurrent(),!0):!1):undefined},function(){return e},function(){n&&n.dispose()})})}var m="Sequence contains no elements.",p=Array.prototype.slice,y=e.Enumerable,d=y.prototype,E=y.concat,w=y.empty,x=y.fromArray,C=y.repeat,b=e.Enumerator.create;inherits=e.Internals.inherits,d.isEmpty=function(){return!this.any()},d.minBy=function(t,r){return r||(r=i),s(this,t,function(t,e){return-r(t,e)})},d.maxBy=function(t,r){return r||(r=i),s(this,t,r)};var N=function(){function t(t){this.disposed=!1,this.source=t}return inherits(t,y),t.prototype.getEnumerator=function(){if(this.disposed)throw Error("Object disposed");var t,r=this;return b(function(){return r.source.moveNext()?(t=r.source.getCurrent(),!0):!1},function(){return t})},t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.source.dispose(),this.source=null)},t}();d.share=function(t){var r=this;return t?new y(function(){return t(r.share()).getEnumerator()}):new N(r.getEnumerator())};var k=c.prototype;k.clear=function(){this.list={},this.length=0},k.get=function(t){if(!this.list[t])throw Error("Element no longer available in the buffer.");var r=this.list[t];return 0===--r.length&&delete this.list[t],r.value},k.push=function(t){this.list[this.length]={value:t,length:this.readerCount},this.length++},k.done=function(t){for(var r=t;this.length>r;r++)this.get(r);this.readerCount--};var D=function(){function t(t){this.source=t,this.buffer=new c(0),this.disposed=!1,this.stopped=!1,this.error=null}function r(t){var r,e=this,n=!1,u=!0,i=!1;return b(function(){if(e.disposed)throw Error("Object disposed");u||t++;var o,f=!1;if(t>=e.buffer.length){if(!e.stopped)try{f=e.source.moveNext(),f&&(o=e.source.getCurrent())}catch(s){e.stopped=!0,e.error=s,e.source.dispose(),n=!0}if(e.stopped){if(e.error)throw e.buffer&&e.buffer.done(t+1),i=!0,e.error;return e.buffer&&e.buffer.done(t+1),i=!0,!1}f&&e.buffer.push(o)}else f=!0;return f?(r=e.buffer.get(t),u=!1,!0):(e.buffer&&e.buffer.done(t+1),i=!0,!1)},function(){return r},function(){i&&e.buffer&&e.buffer.done(t)})}return inherits(t,y),t.prototype.getEnumerator=function(){if(this.disposed)throw Error("Object disposed");var t=this.buffer.length;return this.buffer.readerCount++,r.call(this,t)},t.prototype.dispose=function(){this.disposed||(this.source.dispose(),this.source=null,this.buffer.clear(),this.buffer=null,this.disposed=!0)},t}();d.publish=function(t){var r=this;return t?new y(function(){return t(r.publish()).getEnumerator()}):new D(r.getEnumerator())};var z=a.prototype;z.done=n,z.push=function(t){this.list[this.length++]=t},z.clear=function(){this.list=[],this.length=0},z.get=function(t){return this.list[t]};var A=function(){function t(t,r){this.source=t,this.buffer=r,this.stopped=!1,this.error=null,this.disposed=!1}return inherits(t,y),t.prototype.getEnumerator=function(){if(this.disposed)throw Error("Object disposed");var t,r=0,e=this,n=!1,u=!0,i=!1;return b(function(){if(e.disposed)throw Error("Object disposed");u||r++;var o,f=!1;if(r>=e.buffer.length){if(!e.stopped)try{f=e.source.moveNext(),f&&(o=e.source.getCurrent())}catch(s){e.stopped=!0,e.error=s,e.source.dispose(),n=!0}if(e.stopped){if(e.error)throw e.buffer&&e.buffer.done(r+1),i=!0,e.error;return e.buffer&&e.buffer.done(r+1),i=!0,!1}f&&e.buffer.push(o)}else f=!0;return f?(t=e.buffer.get(r),u=!1,!0):(e.buffer&&e.buffer.done(r+1),i=!0,!1)},function(){return t},function(){i&&e.buffer&&e.buffer.done(r)})},t.prototype.dispose=function(){this.disposed||(this.source.dispose(),this.source=null,this.buffer.clear(),this.buffer=null,this.disposed=!0)},t}();d.memoize=function(){var t=this;return 0===arguments.length?new A(t.getEnumerator(),new a):1===arguments.length&&"function"==typeof arguments[0]?new y(function(){return arguments[1](t.memoize()).getEnumerator()}):1===arguments.length&&"number"==typeof arguments[0]?new A(t.getEnumerator(),new c(arguments[0])):new y(function(){return arguments[1](t.memoize(arguments[0])).getEnumerator()})},y.throwException=function(t){return new y(function(){return b(function(){throw t},n)})};var P=y.defer=function(t){return new y(function(){var r;return b(function(){return r||(r=t().getEnumerator()),r.moveNext()},function(){return r.getCurrent()},function(){r.dispose()})})};y.generate=function(t,r,e,n){return new y(function(){var u,i,o=!1;return b(function(){if(o){if(u=e(u),!r(u))return!1}else u=t,o=!0;return i=n(u),!0},function(){return i})})},y.using=function(t,r){return new y(function(){var e,n,u,i=!0;return b(function(){return i&&(u=t(),n=r(u).getEnumerator(),i=!1),n.moveNext()?(e=n.getCurrent(),!0):!1},function(){return e},function(){n&&n.dispose(),u&&u.dispose()})})},d.doAction=function(t,r,e){var u,i,o,f=this;return"object"==typeof t?(u=h(t.onNext,t),i=h(t.onError,t),o=h(t.onCompleted,t)):(u=t,i=r||n,o=e||n),new y(function(){var t,r;return b(function(){t||(t=f.getEnumerator());try{if(!t.moveNext())return o(),!1;r=t.getCurrent()}catch(t){throw i(t),t}return u(r),!0},function(){return r},function(){t&&t.dispose()})})},d.bufferWithCount=function(t,r){var e=this;return null==r&&(r=t),new y(function(){var n,u,i=[],o=0;return b(function(){for(n||(n=e.getEnumerator());;){if(!n.moveNext())return i.length>0?(u=y.fromArray(i.shift()),!0):!1;0===o%r&&i.push([]);for(var f=0,s=i.length;s>f;f++)i[f].push(n.getCurrent());if(i.length>0&&i[0].length===t)return u=y.fromArray(i.shift()),++o,!0;++o}},function(){return u},function(){n.dispose()})})},d.ignoreElements=function(){var t=this;return new y(function(){var r;return b(function(){for(r=t.getEnumerator();r.moveNext(););return!1},function(){throw Error("Operation is not valid due to the current state of the object.")},function(){r.dispose()})})},d.distinctBy=function(t,r){r||(r=o);var e=this;return new y(function(){var n,u,i=[];return b(function(){for(u||(u=e.getEnumerator());;){if(!u.moveNext())return!1;var o=u.getCurrent(),s=t(o);if(-1===f.call(i,s,r))return i.push(o),n=o,!0}},function(){return n},function(){u&&u.dispose()})})},d.distinctUntilChanged=function(t,r){t||(t=u),r||(r=o);var e=this;return new y(function(){var n,u,i,o;return b(function(){for(u||(u=e.getEnumerator());;){if(!u.moveNext())return!1;var f=u.getCurrent(),s=t(f),c=!1;if(o&&(c=r(i,s)),!o||!c)return n=f,i=s,o=!0,!0}},function(){return n},function(){u&&u.dispose()})})},d.expand=function(t){var r=this;return new y(function(){var e,n,u=[r];return b(function(){for(;;){if(!n){if(0===u.length)return!1;n=u.shift().getEnumerator()}if(n.moveNext())return e=n.getCurrent(),u.push(t(e)),!0;n.dispose(),n=null}},function(){return e},function(){n&&n.dispose()})})},d.startWith=function(){return E(x(p.call(arguments)),this)},d.scan=function(){var t=1===arguments.length?v:l;return t.apply(this,arguments)},d.takeLast=function(t){var r=this;return new y(function(){var e,n,u;return b(function(){if(n||(n=r.getEnumerator()),!u)for(u=[];n.moveNext();)u.push(n.getCurrent()),u.length>t&&u.shift();return 0===u.length?!1:(e=u.shift(),!0)},function(){return e},function(){n&&n.dispose()})})},d.skipLast=function(t){var r=this;return new y(function(){var e,n,u=[];return b(function(){for(n||(n=r.getEnumerator());;){if(!n.moveNext())return!1;if(u.push(n.getCurrent()),u.length>t)return e=u.shift(),!0}},function(){return e},function(){n&&n.dispose()})})},d.repeat=function(t){var r=this;return C(0,t).selectMany(function(){return r})},d.catchException=function(t){if(0===arguments.length)return j(this);if("function"==typeof t)return g(this,t);var r=p.call(arguments);return r.unshift(this),j.apply(null,r)};var j=y.catchException=function(){var t=y.fromArray(arguments);return new y(function(){var r,e,n,u;return b(function(){for(r||(r=t.getEnumerator());;){for(;;){if(!e){if(!r.moveNext()){if(u)throw u;return!1}u=null,e=r.getCurrent().getEnumerator()}var i,o;try{i=e.moveNext(),o=e.getCurrent()}catch(f){u=f,e.dispose(),e=null;break}if(!i){e.dispose(),e=null;break}return n=o,!0}if(null==u)break}},function(){return n},function(){e&&e.dispose(),r&&r.dispose()})})};d.finallyDo=function(t){var r=this;return new y(function(){var e,n=!1;return b(function(){u||(u=r.getEnumerator());var e;try{return e=u.moveNext(),e?e:(t(),n=!0,!1)}catch(u){throw t(),n=!0,u}},function(){return e.getCurrent()},function(){!n&&t(),e&&e.dispose()})})},d.onErrorResumeNext=function(t){return O.apply(null,[this,t])};var O=y.onErrorResumeNext=function(){var t=arguments;return new y(function(){var r,e,n=0;return b(function(){for(;t.length>n;){e||(e=t[n].getEnumerator());try{var u=e.moveNext();if(u)return r=e.getCurrent(),!0}catch(i){}e.dispose(),e=null,n++}return!1},function(){return r},function(){e&&e.dispose()})})};d.retry=function(t){var r=this;return new y(function(){var e,n,u=t,i=null!=t;return b(function(){for(n||(n=r.getEnumerator());;)try{return n.moveNext()?(e=n.getCurrent(),!0):!1}catch(t){if(i&&0===--u)throw t;n=r.getEnumerator(),error=null}},function(){return e},function(){n.dispose()})})};var q=y.whileDo=function(t,r){return C(r).takeWhile(t).selectMany(u)};return y.ifThen=function(t,r,e){return e||(e=w()),P(function(){return t()?r:e})},y.doWhile=function(t,r){return t.concat(q(r,t))},y.cases=function(t,r,e){return e||(e=w()),P(function(){var n=r[t()];return n||(n=e),n})},y.forIn=function(t,r){return t.select(r)},e});

@@ -1,1 +0,1 @@

(function(r){function t(){}function e(r){return r}function n(r,t){return r>t?1:t>r?-1:0}function u(r,t){return r===t}function o(r){return""+r}function i(r,t,e,n){this.keySelector=r,this.comparer=t,this.descending=e,this.next=n}var f="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(r=global),exports),s={internals:{}},a="Sequence contains no elements.",c="Invalid operation",l=Array.prototype.slice,m={}.hasOwnProperty,h=s.internals.inherits=function(r,t){function e(){this.constructor=r}for(var n in t)"prototype"!==n&&m.call(t,n)&&(r[n]=t[n]);return e.prototype=t.prototype,r.prototype=new e,r.super_=t.prototype,r},v=s.Enumerator=function(r,t,e){this.moveNext=r,this.getCurrent=t,this.dispose=e},g=v.create=function(r,e,n){var u=!1;return n||(n=t),new v(function(){if(u)return!1;var t=r();return t||(u=!0,n()),t},function(){return e()},function(){u||(n(),u=!0)})},p=s.Enumerable=function(){function r(r){this.getEnumerator=r}function t(r,t,n){n||(n=e);var u=r,o=this.getEnumerator(),i=0;try{for(;o.moveNext();)u=t(u,o.getCurrent(),i++,this)}finally{o.dispose()}return n?n(u):u}function n(r){var t,e=this.getEnumerator(),n=0;try{if(!e.moveNext())throw Error(a);for(t=e.getCurrent();e.moveNext();)t=r(t,e.getCurrent(),n++,this)}finally{e.dispose()}return t}function i(r,t){t||(t=u);for(var e=this.length;e--;)if(t(this[e],r))return e;return-1}function f(r,t){var e=i.call(this,r,t);return-1===e?!1:(this.splice(e,1),!0)}var s=r.prototype;return s.aggregate=function(){var r=1===arguments.length?n:t;return r.apply(this,arguments)},s.reduce=function(){return 2===arguments.length?t.call(this,arguments[1],arguments[0]):n.apply(this,arguments)},s.all=s.every=function(r){var t=this.getEnumerator(),e=arguments[1];try{for(;t.moveNext();)if(!r(t.getCurrent(),e))return!1}finally{t.dispose()}return!0},s.any=s.some=function(r){var t=this.getEnumerator(),e=arguments[1];try{for(;t.moveNext();)if(!r||r(t.getCurrent(),e))return!0}finally{t.dispose()}return!1},s.average=function(r){if(r)return this.select(r).average();var t=this.getEnumerator(),e=0,n=0;try{for(;t.moveNext();)e++,n+=t.getCurrent()}finally{t.dispose()}if(0===e)throw Error(a);return n/e},s.concat=function(){var r=l.call(arguments,0);return r.unshift(this),y.apply(null,r)},s.contains=function(r,t){t||(t=u);var e=this.getEnumerator();try{for(;e.moveNext();)if(t(r,e.getCurrent()))return!0}finally{e.dispose()}return!1},s.count=function(r){var t=0,e=this.getEnumerator();try{for(;e.moveNext();)(!r||r(e.getCurrent()))&&t++}finally{e.dispose()}return t},s.defaultIfEmpty=function(t){var e=this;return new r(function(){var r,n,u=!0,o=!1;return g(function(){return n||(n=e.getEnumerator()),o?!1:u?(u=!1,n.moveNext()?(r=n.getCurrent(),!0):(r=t,o=!0,!0)):n.moveNext()?(r=n.getCurrent(),!0):!1},function(){return r},function(){n&&n.dispose()})})},s.distinct=function(t){t||(t=u);var e=this;return new r(function(){var r,n,u=[];return g(function(){for(n||(n=e.getEnumerator());;){if(!n.moveNext())return!1;if(r=n.getCurrent(),-1===i.call(u,r,t))return u.push(r),!0}},function(){return r},function(){n.dispose()})})},s.elementAt=function(r){return this.skip(r).first()},s.elementAtOrDefault=function(r){return this.skip(r).firstOrDefault()},s.except=function(t,e){e||(e=u);var n=this;return new r(function(){var r,u,o=[],f=n.getEnumerator();try{for(;f.moveNext();)o.push(f.getCurrent())}finally{f.dispose()}return g(function(){for(u||(u=t.getEnumerator());;){if(!u.moveNext())return!1;if(r=u.getCurrent(),-1===i.call(o,r,e))return o.push(r),!0}},function(){return r},function(){u&&u.dispose()})})},s.first=function(r){var t=this.getEnumerator();try{for(;t.moveNext();){var e=t.getCurrent();if(!r||r(e))return e}}finally{t.dispose()}throw Error(a)},s.firstOrDefault=function(r){var t=this.getEnumerator();try{for(;t.moveNext();){var e=t.getCurrent();if(!r||r(e))return e}}finally{t.dispose()}return null},s.forEach=function(r){var t=this.getEnumerator(),e=0;try{for(;t.moveNext();)r(t.getCurrent(),e++)}finally{t.dispose()}},s.groupBy=function(t,n,u,i){n||(n=e),i||(i=o);var f=this;return new r(function(){var r,e,o,s,a,c,l={},m=[],h=0,v=f.getEnumerator();try{for(;v.moveNext();)o=v.getCurrent(),s=t(o),a=i(s),l[a]||(l[a]=[],m.push(a)),c=n(o),l[a].push(c)}finally{v.dispose()}return g(function(){var t;return m.length>h?(e=m[h++],t=E(l[e]),u?r=u(e,t):(t.key=e,r=t),!0):!1},function(){return r})})},s.intersect=function(t,e){e||(e=u);var n=this;return new r(function(){var r,u,o=[],i=n.getEnumerator();try{for(;i.moveNext();)o.push(i.getCurrent())}finally{i.dispose()}return g(function(){for(u||(u=t.getEnumerator());;){if(!u.moveNext())return!1;if(r=u.getCurrent(),f.call(o,r,e))return!0}},function(){return r},function(){u&&u.dispose()})})},s.last=function(r){var t,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var u=n.getCurrent();(!r||r(u))&&(e=!0,t=u)}}finally{n.dispose()}if(e)return t;throw Error(a)},s.lastOrDefault=function(r){var t,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var u=n.getCurrent();(!r||r(u))&&(e=!0,t=u)}}finally{n.dispose()}return e?t:null},s.max=function(r){if(r)return this.select(r).max();var t,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var u=n.getCurrent();e?u>t&&(t=u):(t=u,e=!0)}}finally{n.dispose()}if(!e)throw Error(a);return t},s.min=function(r){if(r)return this.select(r).min();var t,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var u=n.getCurrent();e?t>u&&(t=u):(t=u,e=!0)}}finally{n.dispose()}if(!e)throw Error(a);return t},s.orderBy=function(r,t){return new x(this,r,t,!1)},s.orderByDescending=function(r,t){return new x(this,r,t,!0)},s.reverse=function(){var r=[],t=this.getEnumerator();try{for(;t.moveNext();)r.unshift(t.getCurrent())}finally{t.dispose()}return E(r)},s.select=function(t){var e=this;return new r(function(){var r,n,u=0;return g(function(){return n||(n=e.getEnumerator()),n.moveNext()?(r=t(n.getCurrent(),u++),!0):!1},function(){return r},function(){n.dispose()})})},s.selectMany=function(t,e){var n=this;return new r(function(){var r,u,o;return g(function(){for(u||(u=n.getEnumerator());;){if(!o){if(!u.moveNext())return!1;o=t(u.getCurrent()).getEnumerator()}if(o.moveNext()){if(r=o.getCurrent(),e){var i=u.getCurrent();r=e(i,r)}return!0}o.dispose(),o=null}},function(){return r},function(){o&&o.dispose(),u&&u.dispose()})})},r.sequenceEqual=function(r,t,e){return r.sequenceEqual(t,e)},s.sequenceEqual=function(r,t){t||(t=u);var e=this.getEnumerator(),n=r.getEnumerator();try{for(;e.moveNext();)if(!n.moveNext()||!t(e.getCurrent(),n.getCurrent()))return!1;return n.moveNext()?!1:!0}finally{e.dispose(),n.dispose()}},s.single=function(r){if(r)return this.where(r).single();var t=this.getEnumerator();try{for(;t.moveNext();){var e=t.getCurrent();if(t.moveNext())throw Error(c);return e}}finally{t.dispose()}throw Error(a)},s.singleOrDefault=function(r){if(r)return this.where(r).single();var t=this.getEnumerator();try{for(;t.moveNext();){var e=t.getCurrent();if(t.moveNext())throw Error(c);return e}}finally{t.dispose()}return null},s.skip=function(t){var e=this;return new r(function(){var r,n,u=!1;return g(function(){if(n||(n=e.getEnumerator()),!u){for(var o=0;t>o;o++)if(!n.moveNext())return!1;u=!0}return n.moveNext()?(r=n.getCurrent(),!0):!1},function(){return r},function(){n.dispose()})})},s.skipWhile=function(t){var e=this;return new r(function(){var r,n,u=!1;return g(function(){if(n||(n=e.getEnumerator()),!u){for(;;){if(!n.moveNext())return!1;if(!t(n.getCurrent()))return r=n.getCurrent(),!0}u=!0}return n.moveNext()?(r=n.getCurrent(),!0):!1},function(){return r},function(){n.dispose()})})},s.sum=function(r){if(r)return this.select(r).sum();var t=0,e=this.getEnumerator();try{for(;e.moveNext();)t+=e.getCurrent()}finally{e.dispose()}return t},s.take=function(t){var e=this;return new r(function(){var r,n,u=t;return g(function(){return n||(n=e.getEnumerator()),0===u?!1:n.moveNext()?(u--,r=n.getCurrent(),!0):(u=0,!1)},function(){return r},function(){n.dispose()})})},s.takeWhile=function(t){var e=this;return new r(function(){var r,n,u=0;return g(function(){return n||(n=e.getEnumerator()),n.moveNext()?(r=n.getCurrent(),t(r,u++)?!0:!1):!1},function(){return r},function(){n.dispose()})})},s.toArray=function(){var r=[],t=this.getEnumerator();try{for(;t.moveNext();)r.push(t.getCurrent());return r}finally{t.dispose()}},s.where=function(t){var e=this;return new r(function(){var r,n,u=0;return g(function(){for(n||(n=e.getEnumerator());;){if(!n.moveNext())return!1;if(r=n.getCurrent(),t(r,u++))return!0}},function(){return r},function(){n.dispose()})})},s.union=function(r,t){t||(t=u);var e=this;return d(function(){var n,u,o=[],f=!1,s=!1;return g(function(){for(;;){if(!u){if(s)return!1;f?(u=r.getEnumerator(),s=!0):(u=e.getEnumerator(),f=!0)}if(u.moveNext()){if(n=u.getCurrent(),-1===i.call(o,n,t))return o.push(n),!0}else u.dispose(),u=null}},function(){return n},function(){u&&u.dispose()})})},s.zip=function(t,e){var n=this;return new r(function(){var r,u,o;return g(function(){return r||u||(r=n.getEnumerator(),u=t.getEnumerator()),r.moveNext()&&u.moveNext()?(o=e(r.getCurrent(),u.getCurrent()),!0):!1},function(){return o},function(){r.dispose(),u.dispose()})})},r}(),y=p.concat=function(){return E(arguments).selectMany(e)},d=p.create=function(r){return new p(r)};p.empty=function(){return new p(function(){return g(function(){return!1},function(){throw Error(a)})})};var E=p.fromArray=function(r){return new p(function(){var t,e=0;return g(function(){return r.length>e?(t=r[e++],!0):!1},function(){return t})})};p.returnValue=function(r){return new p(function(){var t=!1;return g(function(){return t?!1:t=!0},function(){return r})})},p.range=function(r,t){return new p(function(){var e=r-1,n=r+t-1;return g(function(){return n>e?(e++,!0):!1},function(){return e})})},p.repeat=function(r,t){return new p(function(){var e=null==t?-1:t,n=null!=t;return g(function(){return 0!==e?(n&&e--,!0):!1},function(){return r})})},i.prototype={computeKeys:function(r,t){this.keys=Array(t);for(var e=0;t>e;e++)this.keys[e]=this.keySelector(r[e]);this.next&&this.next.computeKeys(r,t)},compareKeys:function(r,t){var e=this.comparer(this.keys[r],this.keys[t]);return 0===e?null==this.next?r-t:this.next.compareKeys(r,t):this.descending?-e:e},sort:function(r,t){this.computeKeys(r,t);for(var e=Array(t),n=0;t>n;n++)e[n]=n;return this.quickSort(e,0,t-1),e},quickSort:function(r,t,e){do{var n=t,u=e,o=r[n+(u-n>>1)];do{for(;r.length>n&&this.compareKeys(o,r[n])>0;)n++;for(;u>=0&&0>this.compareKeys(o,r[u]);)u--;if(n>u)break;if(u>n){var i=r[n];r[n]=r[u],r[u]=i}n++,u--}while(u>=n);e-n>=u-t?(u>t&&this.quickSort(r,t,u),t=n):(e>n&&this.quickSort(r,n,e),e=u)}while(e>t)}};var x=function(){function r(r,t,u,o){this.source=r,this.keySelector=t||e,this.comparer=u||n,this.descending=o}h(r,p);var t=r.prototype;return t.getEnumerableSorter=function(r){var t=new i(this.keySelector,this.comparer,this.descending,r);return null!=this.parent&&(t=this.parent.getEnumerableSorter(t)),t},t.createOrderedEnumerable=function(t,e,n){var u=new r(this.source,t,e,n);return u.parent=this,u},t.getEnumerator=function(){var r,t=this.source.toArray(),e=t.length,n=this.getEnumerableSorter(),u=n.sort(t,e),o=0;return g(function(){return e>o?(r=t[u[o++]],!0):!1},function(){return r})},t.thenBy=function(r){return this.createOrderedEnumerable(r,null,!1)},t.thenByDescending=function(r,t){return this.CreateOrderedEnumerable(r,t,!1)},r}();return"function"==typeof define&&"object"==typeof define.amd&&define.amd?(r.Ix=s,define(function(){return s})):(f?"object"==typeof module&&module&&module.exports==f?module.exports=s:f=s:r.Ix=s,undefined)})(this);
(function(t,r){function e(){}function n(t){return t}function i(t,r){return t>r?1:r>t?-1:0}function u(t,r){return t===r}function o(t){if(false&t)return 2===t;for(var r=Math.sqrt(t),e=3;r>=e;){if(0===t%e)return!1;e+=2}return!0}function a(t){var r,e,n;for(r=0;x.length>r;++r)if(e=x[r],e>=t)return e;for(n=1|t;x[x.length-1]>n;){if(o(n))return n;n+=2}return t}function s(t){var r=0;if(!t.length)return r;for(var e=0,n=t.length;n>e;e++){var i=t.charCodeAt(e);r=(r<<5)-r+i,r&=r}return r}function f(t){var r=668265261;return t=61^t^t>>>16,t+=t<<3,t^=t>>>4,t*=r,t^=t>>>15}function c(){return{key:null,value:null,next:0,hashCode:0}}function h(t){t&&t.dispose()}function l(t,r,e,n){this.keySelector=t,this.comparer=r,this.descending=e,this.next=n}var v="object"==typeof exports&&exports,m=("object"==typeof module&&module&&module.exports==v&&module,"object"==typeof global&&global);m.global===m&&(t=m);var g={Internals:{}},y="Sequence contains no elements.",p="Invalid operation",E=Array.prototype.slice;({}).hasOwnProperty;var w=this.inherits=g.Internals.inherits=function(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e};g.Internals.addProperties=function(t){for(var r=E.call(arguments,1),e=0,n=r.length;n>e;e++){var i=r[e];for(var u in i)t[u]=i[u]}};var x=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],d="no such key",C="duplicate key",k=function(){var t=0;return function(r){if(null==r)throw Error(d);if("string"==typeof r)return s(r);if("number"==typeof r)return f(r);if("boolean"==typeof r)return r===!0?1:0;if(r instanceof Date)return r.getTime();if(r.getHashCode)return r.getHashCode();var e=17*t++;return r.getHashCode=function(){return e},e}}(),N=function(t,r){if(0>t)throw Error("out of range");t>0&&this._initialize(t),this.comparer=r||i,this.freeCount=0,this.size=0,this.freeList=-1};DictionaryPrototype=N.prototype,DictionaryPrototype._initialize=function(t){var r,e=a(t);for(this.buckets=Array(e),this.entries=Array(e),r=0;e>r;r++)this.buckets[r]=-1,this.entries[r]=c();this.freeList=-1},DictionaryPrototype.add=function(t,r){return this._insert(t,r,!0)},DictionaryPrototype._insert=function(t,e,n){this.buckets||this._initialize(0);for(var i,u=2147483647&k(t),o=u%this.buckets.length,a=this.buckets[o];a>=0;a=this.entries[a].next)if(this.entries[a].hashCode===u&&this.comparer(this.entries[a].key,t)){if(n)throw Error(C);return this.entries[a].value=e,r}this.freeCount>0?(i=this.freeList,this.freeList=this.entries[i].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),o=u%this.buckets.length),i=this.size,++this.size),this.entries[i].hashCode=u,this.entries[i].next=this.buckets[o],this.entries[i].key=t,this.entries[i].value=e,this.buckets[o]=i},DictionaryPrototype._resize=function(){var t=a(2*this.size),r=Array(t);for(n=0;r.length>n;++n)r[n]=-1;var e=Array(t);for(n=0;this.size>n;++n)e[n]=this.entries[n];for(var n=this.size;t>n;++n)e[n]=c();for(var i=0;this.size>i;++i){var u=e[i].hashCode%t;e[i].next=r[u],r[u]=i}this.buckets=r,this.entries=e},DictionaryPrototype.remove=function(t){if(this.buckets)for(var r=2147483647&k(t),e=r%this.buckets.length,n=-1,i=this.buckets[e];i>=0;i=this.entries[i].next){if(this.entries[i].hashCode===r&&this.comparer(this.entries[i].key,t))return 0>n?this.buckets[e]=this.entries[i].next:this.entries[n].next=this.entries[i].next,this.entries[i].hashCode=-1,this.entries[i].next=this.freeList,this.entries[i].key=null,this.entries[i].value=null,this.freeList=i,++this.freeCount,!0;n=i}return!1},DictionaryPrototype.clear=function(){var t,r;if(!(0>=this.size)){for(t=0,r=this.buckets.length;r>t;++t)this.buckets[t]=-1;for(t=0;this.size>t;++t)this.entries[t]=c();this.freeList=-1,this.size=0}},DictionaryPrototype._findEntry=function(t){if(this.buckets)for(var r=2147483647&k(t),e=this.buckets[r%this.buckets.length];e>=0;e=this.entries[e].next)if(this.entries[e].hashCode===r&&this.comparer(this.entries[e].key,t))return e;return-1},DictionaryPrototype.length=function(){return this.size-this.freeCount},DictionaryPrototype.tryGetValue=function(t){var e=this._findEntry(t);return e>=0?this.entries[e].value:r},DictionaryPrototype.getValues=function(){var t=0,r=[];if(this.entries)for(var e=0;this.size>e;e++)this.entries[e].hashCode>=0&&(r[t++]=this.entries[e].value);return r},DictionaryPrototype.get=function(t){var r=this._findEntry(t);if(r>=0)return this.entries[r].value;throw Error(d)},DictionaryPrototype.set=function(t,r){this._insert(t,r,!1)},DictionaryPrototype.has=function(t){return this._findEntry(t)>=0},DictionaryPrototype.toEnumerable=function(){var t=this;return new P(function(){var r,n=0;return z(function(){if(!t.entries)return!1;for(;;){if(!(t.size>n))return!1;if(t.entries[n].hashCode>=0){var e=t.entries[n];return r={key:e.key,value:e.value},n++,!0}}},function(){return r},e)})};var b=function(){function t(t){this.map=t}var r=t.prototype;return r.has=function(t){return this.map.containsKey(t)},r.length=function(){return this.map.length()},r.get=function(t){return S(this.map.get(t))},r.toEnumerable=function(){return this.map.toEnumerable().select(function(t){var r=S(t.value);return r.key=t.key,r})},t}(),D=g.Enumerator=function(t,r,e){this.moveNext=t,this.getCurrent=r,this.dispose=e},z=D.create=function(t,r,n){var i=!1;return n||(n=e),new D(function(){if(i)return!1;var r=t();return r||(i=!0,n()),r},function(){return r()},function(){i||(n(),i=!0)})},P=g.Enumerable=function(){function t(t){this.getEnumerator=t}function r(t,r,e){e||(e=n);var i=t,u=this.getEnumerator(),o=0;try{for(;u.moveNext();)i=r(i,u.getCurrent(),o++,this)}finally{u.dispose()}return e?e(i):i}function e(t){var r,e=this.getEnumerator(),n=0;try{if(!e.moveNext())throw Error(y);for(r=e.getCurrent();e.moveNext();)r=t(r,e.getCurrent(),n++,this)}catch(i){throw i}finally{e.dispose()}return r}function i(t,r){r||(r=u);for(var e=this.length;e--;)if(r(this[e],t))return e;return-1}function o(t,r){var e=i.call(this,t,r);return-1===e?!1:(this.splice(e,1),!0)}var a=t.prototype;return a.aggregate=function(){var t=1===arguments.length?e:r;return t.apply(this,arguments)},a.reduce=function(){return 2===arguments.length?r.call(this,arguments[1],arguments[0]):e.apply(this,arguments)},a.all=a.every=function(t,r){var e=this.getEnumerator(),n=0;try{for(;e.moveNext();)if(!t.call(r,e.getCurrent(),n++,this))return!1}catch(i){throw i}finally{h(e)}return!0},a.every=a.all,a.any=function(t,r){var e=this.getEnumerator(),n=0;try{for(;e.moveNext();)if(!t||t.call(r,e.getCurrent(),n++,this))return!0}catch(i){throw i}finally{h(e)}return!1},a.some=a.any,a.average=function(t){if(t)return this.select(t).average();var r=this.getEnumerator(),e=0,n=0;try{for(;r.moveNext();)e++,n+=r.getCurrent()}catch(i){throw i}finally{h(r)}if(0===e)throw Error(y);return n/e},a.concat=function(){var t=E.call(arguments,0);return t.unshift(this),A.apply(null,t)},a.contains=function(t,r){r||(r=u);var e=this.getEnumerator();try{for(;e.moveNext();)if(r(t,e.getCurrent()))return!0}catch(n){throw n}finally{h(e)}return!1},a.count=function(t,r){var e=0,n=0,i=this.getEnumerator();try{for(;i.moveNext();)(!t||t.call(r,i.getCurrent(),n++,this))&&e++}catch(u){throw u}finally{h(i)}return e},a.defaultIfEmpty=function(r){var e=this;return new t(function(){var t,n,i=!0,u=!1;return z(function(){return n||(n=e.getEnumerator()),u?!1:i?(i=!1,n.moveNext()?(t=n.getCurrent(),!0):(t=r,u=!0,!0)):n.moveNext()?(t=n.getCurrent(),!0):!1},function(){return t},function(){h(n)})})},a.distinct=function(r){r||(r=u);var e=this;return new t(function(){var t,n,u=[];return z(function(){for(n||(n=e.getEnumerator());;){if(!n.moveNext())return!1;var o=n.getCurrent();if(-1===i.call(u,o,r))return t=o,u.push(t),!0}},function(){return t},function(){h(n)})})},a.elementAt=function(t){return this.skip(t).first()},a.elementAtOrDefault=function(t){return this.skip(t).firstOrDefault()},a.except=function(r,e){e||(e=u);var n=this;return new t(function(){var t,u,o=[],a=r.getEnumerator();try{for(;a.moveNext();)o.push(a.getCurrent())}catch(s){throw s}finally{h(a)}return z(function(){for(u||(u=n.getEnumerator());;){if(!u.moveNext())return!1;if(t=u.getCurrent(),-1===i.call(o,t,e))return o.push(t),!0}},function(){return t},function(){h(u)})})},a.first=function(t){var r=this.getEnumerator();try{for(;r.moveNext();){var e=r.getCurrent();if(!t||t(e))return e}}catch(n){throw n}finally{h(r)}throw Error(y)},a.firstOrDefault=function(t){var r=this.getEnumerator();try{for(;r.moveNext();){var e=r.getCurrent();if(!t||t(e))return e}}catch(n){throw n}finally{h(r)}return null},a.forEach=function(t,r){var e=this.getEnumerator(),n=0;try{for(;e.moveNext();)t.call(r,e.getCurrent(),n++,this)}catch(i){throw i}finally{h(e)}},a.groupBy=function(r,e,i,o){e||(e=n),o||(o=u);var a=this;return new t(function(){var t,n,u,s,f,c=new N(0,o),l=[],v=0,m=a.getEnumerator();try{for(;m.moveNext();)u=m.getCurrent(),s=r(u),c.has(s)||(c.add(s,[]),l.push(s)),f=e(u),c.get(s).push(f)}catch(g){throw g}finally{h(m)}return z(function(){var r;return l.length>v?(n=l[v++],r=S(c.get(n)),i?t=i(n,r):(r.key=n,t=r),!0):!1},function(){return t})})},a.groupJoin=function(r,e,i,o,a){var s=this;return a||(a=u),new t(function(){var t,u,f;return z(function(){if(t||(t=s.getEnumerator()),u||(u=r.toLookup(i,n,a)),!t.moveNext())return!1;var c=t.getCurrent(),h=u.get(e(c));return f=o(c,h),!0},function(){return f},function(){h(t)})})},a.join=function(r,e,i,o,a){var s=this;return a||(a=u),new t(function(){var t,u,f,c,l=0;return z(function(){for(t||(t=s.getEnumerator()),f||(f=r.toLookup(i,n,a));;){if(null!=c){var h=c[l++];if(h)return u=o(t.getCurrent(),h),!0;h=null,l=0}if(!t.moveNext())return!1;var v=e(t.getCurrent());c=f.get(v).toArray()}},function(){return u},function(){h(t)})})},a.intersect=function(r,e){e||(e=u);var n=this;return new t(function(){var t,i,u=[],a=r.getEnumerator();try{for(;a.moveNext();)u.push(a.getCurrent())}catch(s){throw s}finally{h(a)}return z(function(){for(i||(i=n.getEnumerator());;){if(!i.moveNext())return!1;var r=i.getCurrent();if(o.call(u,r,e))return t=r,!0}},function(){return t},function(){h(i)})})},a.last=function(t){var r,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var i=n.getCurrent();(!t||t(i))&&(e=!0,r=i)}}catch(u){throw u}finally{h(n)}if(e)return r;throw Error(y)},a.lastOrDefault=function(t){var r,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var i=n.getCurrent();(!t||t(i))&&(e=!0,r=i)}}catch(u){throw u}finally{n.dispose()}return e?r:null},a.max=function(t){if(t)return this.select(t).max();var r,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var i=n.getCurrent();e?i>r&&(r=i):(r=i,e=!0)}}catch(u){throw u}finally{n.dispose()}if(!e)throw Error(y);return r},a.min=function(t){if(t)return this.select(t).min();var r,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var i=n.getCurrent();e?r>i&&(r=i):(r=i,e=!0)}}catch(u){throw u}finally{h(n)}if(!e)throw Error(y);return r},a.orderBy=function(t,r){return new L(this,t,r,!1)},a.orderByDescending=function(t,r){return new L(this,t,r,!0)},a.reverse=function(){var t=[],r=this.getEnumerator();try{for(;r.moveNext();)t.unshift(r.getCurrent())}catch(e){throw e}finally{h(r)}return S(t)},a.select=function(r,e){var n=this;return new t(function(){var t,i,u=0;return z(function(){return i||(i=n.getEnumerator()),i.moveNext()?(t=r.call(e,i.getCurrent(),u++,n),!0):!1},function(){return t},function(){h(i)})})},a.map=a.select,a.selectMany=function(r,e){var n=this;return new t(function(){var t,i,u,o=0;return z(function(){for(i||(i=n.getEnumerator());;){if(!u){if(!i.moveNext())return!1;u=r(i.getCurrent(),o++).getEnumerator()}if(u.moveNext()){if(t=u.getCurrent(),e){var a=i.getCurrent();t=e(a,t)}return!0}h(u),u=null}},function(){return t},function(){h(u),h(i)})})},t.sequenceEqual=function(t,r,e){return t.sequenceEqual(r,e)},a.sequenceEqual=function(t,r){r||(r=u);var e=this.getEnumerator(),n=t.getEnumerator();try{for(;e.moveNext();)if(!n.moveNext()||!r(e.getCurrent(),n.getCurrent()))return!1;return n.moveNext()?!1:!0}catch(i){throw i}finally{h(e),h(n)}},a.single=function(t){if(t)return this.where(t).single();var r=this.getEnumerator();try{if(!r.moveNext())throw Error(y);var e=r.getCurrent();if(r.moveNext())throw Error(p);return e}catch(n){throw n}finally{h(r)}},a.singleOrDefault=function(t){if(t)return this.where(t).single();var r=this.getEnumerator();try{for(;r.moveNext();){var e=r.getCurrent();if(r.moveNext())throw Error(p);return e}}catch(n){throw n}finally{h(r)}return null},a.skip=function(r){var e=this;return new t(function(){var t,n,i=!1;return z(function(){if(n||(n=e.getEnumerator()),!i){for(var u=0;r>u;u++)if(!n.moveNext())return!1;i=!0}return n.moveNext()?(t=n.getCurrent(),!0):!1},function(){return t},function(){h(n)})})},a.skipWhile=function(r,e){var n=this;return new t(function(){var t,i,u=!1,o=0;return z(function(){if(i||(i=n.getEnumerator()),!u){for(;;){if(!i.moveNext())return!1;var a=i.getCurrent();if(!r.call(e,a,o++,n))return t=a,!0}u=!0}return i.moveNext()?(t=i.getCurrent(),!0):!1},function(){return t},function(){h(i)})})},a.sum=function(t){if(t)return this.select(t).sum();var r=0,e=this.getEnumerator();try{for(;e.moveNext();)r+=e.getCurrent()}catch(n){throw n}finally{h(e)}return r},a.take=function(r){var e=this;return new t(function(){var t,n,i=r;return z(function(){return n||(n=e.getEnumerator()),0===i?!1:n.moveNext()?(i--,t=n.getCurrent(),!0):(i=0,!1)},function(){return t},function(){h(n)})})},a.takeWhile=function(r,e){var n=this;return new t(function(){var t,i,u=0;return z(function(){return i||(i=n.getEnumerator()),i.moveNext()?(t=i.getCurrent(),r.call(e,t,u++,n)?!0:!1):!1},function(){return t},function(){h(i)})})},a.toArray=function(){var t=[],r=this.getEnumerator();try{for(;r.moveNext();)t.push(r.getCurrent());return t}catch(r){throw r}finally{h(r)}},a.toDictionary=function(t,r,e){r||(r=n),e||(e=u);var i=new N(0,e),o=this.getEnumerator();try{for(;o.moveNext();){var a=o.getCurrent(),s=t(a);elem=r(a),i.add(s,elem)}return i}catch(f){throw f}finally{h(o)}},a.toLookup=function(t,r,e){r||(r=n),e||(e=u);var i=new N(0,e),o=this.getEnumerator();try{for(;o.moveNext();){var a=o.getCurrent(),s=t(a);elem=r(a),i.has(s)||i.add(s,[]),i.get(s).push(elem)}return new b(i)}catch(f){throw f}finally{h(o)}},a.where=function(r,e){var n=this;return new t(function(){var t,i,u=0;return z(function(){for(i||(i=n.getEnumerator());;){if(!i.moveNext())return!1;var o=i.getCurrent();if(r.call(e,o,u++,n))return t=o,!0}},function(){return t},function(){h(i)})})},a.filter=a.where,a.union=function(t,r){r||(r=u);var e=this;return q(function(){var n,u,o=[],a=!1,s=!1;return z(function(){for(;;){if(!u){if(s)return!1;a?(u=t.getEnumerator(),s=!0):(u=e.getEnumerator(),a=!0)}if(u.moveNext()){if(n=u.getCurrent(),-1===i.call(o,n,r))return o.push(n),!0}else h(u),u=null}},function(){return n},function(){h(u)})})},a.zip=function(r,e){var n=this;return new t(function(){var t,i,u;return z(function(){return t||i||(t=n.getEnumerator(),i=r.getEnumerator()),t.moveNext()&&i.moveNext()?(u=e(t.getCurrent(),i.getCurrent()),!0):!1},function(){return u},function(){h(t),h(i)})})},t}(),A=P.concat=function(){return S(arguments).selectMany(n)},q=P.create=function(t){return new P(t)};P.empty=function(){return new P(function(){return z(function(){return!1},function(){throw Error(y)})})};var S=P.fromArray=function(t){return new P(function(){var r,e=0;return z(function(){return t.length>e?(r=t[e++],!0):!1},function(){return r})})},_=P.returnValue=function(t){return new P(function(){var r=!1;return z(function(){return r?!1:r=!0},function(){return t})})};P["return"]=_,P.range=function(t,r){return new P(function(){var e=t-1,n=t+r-1;return z(function(){return n>e?(e++,!0):!1},function(){return e})})},P.repeat=function(t,r){return new P(function(){var e=null==r?-1:r,n=null!=r;return z(function(){return 0!==e?(n&&e--,!0):!1},function(){return t})})},l.prototype={computeKeys:function(t,r){this.keys=Array(r);for(var e=0;r>e;e++)this.keys[e]=this.keySelector(t[e]);this.next&&this.next.computeKeys(t,r)},compareKeys:function(t,r){var e=this.comparer(this.keys[t],this.keys[r]);return 0===e?null==this.next?t-r:this.next.compareKeys(t,r):this.descending?-e:e},sort:function(t,r){this.computeKeys(t,r);for(var e=Array(r),n=0;r>n;n++)e[n]=n;return this.quickSort(e,0,r-1),e},quickSort:function(t,r,e){do{var n=r,i=e,u=t[n+(i-n>>1)];do{for(;t.length>n&&this.compareKeys(u,t[n])>0;)n++;for(;i>=0&&0>this.compareKeys(u,t[i]);)i--;if(n>i)break;if(i>n){var o=t[n];t[n]=t[i],t[i]=o}n++,i--}while(i>=n);e-n>=i-r?(i>r&&this.quickSort(t,r,i),r=n):(e>n&&this.quickSort(t,n,e),e=i)}while(e>r)}};var L=function(){function t(t,r,e,u){this.source=t,this.keySelector=r||n,this.comparer=e||i,this.descending=u}w(t,P);var r=t.prototype;return r.getEnumerableSorter=function(t){var r=new l(this.keySelector,this.comparer,this.descending,t);return null!=this.parent&&(r=this.parent.getEnumerableSorter(r)),r},r.createOrderedEnumerable=function(r,e,n){var i=new t(this.source,r,e,n);return i.parent=this,i},r.getEnumerator=function(){var t,r=this.source.toArray(),e=r.length,n=this.getEnumerableSorter(),i=n.sort(r,e),u=0;return z(function(){return e>u?(t=r[i[u++]],!0):!1},function(){return t})},r.thenBy=function(t){return this.createOrderedEnumerable(t,null,!1)},r.thenByDescending=function(t,r){return this.createOrderedEnumerable(t,r,!1)},t}();return"function"==typeof define&&"object"==typeof define.amd&&define.amd?(t.Ix=g,define(function(){return g})):(v?"object"==typeof module&&module&&module.exports==v?module.exports=g:v=g:t.Ix=g,r)})(this);

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

"description": "Library for composing asynchronous and event-based operations in JavaScript",
"version": "1.0.0",
"version": "1.0.2",
"homepage": "http://rx.codeplex.com",

@@ -24,8 +24,9 @@ "author": {

"devDependencies": {
"grunt": "~0.4.0",
"grunt-contrib-jshint": "~0.1.1",
"grunt-contrib-nodeunit": "~0.1.2",
"grunt-cli": "*",
"grunt": "~0.4.1",
"grunt-contrib-jshint": "*",
"grunt-contrib-uglify": "*",
"grunt-contrib-concat": "*",
"grunt-contrib-qunit": "*"
"grunt-contrib-qunit": "*",
"grunt-contrib-watch": "*"
},

@@ -32,0 +33,0 @@ "keywords": [

@@ -1,2 +0,2 @@

# The Reactive Extensions for JavaScript... #
# The Interactive Extensions for JavaScript... #
*...is a set of libraries to compose pull-based collections and LINQ-style query operators in JavaScript*

@@ -3,0 +3,0 @@

@@ -11,14 +11,2 @@ // Headers

var slice = Array.prototype.slice;
var hasProp = {}.hasOwnProperty;
var inherits = root.internals.inherits = function (child, parent) {
for (var key in parent) {
if (key !== 'prototype' && hasProp.call(parent, key)) child[key] = parent[key];
}
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor();
child.super_ = parent.prototype;
return child;
};

@@ -1,2 +0,2 @@

var Enumerator = root.Enumerator = function (moveNext, getCurrent, dispose) {
var Enumerator = Ix.Enumerator = function (moveNext, getCurrent, dispose) {
this.moveNext = moveNext;

@@ -3,0 +3,0 @@ this.getCurrent = getCurrent;

// Check for AMD
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
window.Ix = root;
window.Ix = Ix;
return define(function () {
return root;
return Ix;
});
} else if (freeExports) {
if (typeof module == 'object' && module && module.exports == freeExports) {
module.exports = root;
module.exports = Ix;
} else {
freeExports = root;
freeExports = Ix;
}
} else {
window.Ix = root;
window.Ix = Ix;
}
(function (window, undefined) {
var freeExports = typeof exports == 'object' && exports &&
(typeof global == 'object' && global && global == global.global && (window = global), exports);
var freeExports = typeof exports == 'object' && exports,
freeModule = typeof module == 'object' && module && module.exports == freeExports && module,
freeGlobal = typeof global == 'object' && global;
if (freeGlobal.global === freeGlobal) {
window = freeGlobal;
}
var root = { internals: {} };
var Ix = { Internals: {} };

@@ -27,2 +27,2 @@ function noop () { }

enumeratorCreate = root.Enumerator.create
inherits = root.internals.inherits;
inherits = root.Internals.inherits;
(function (global) {
var root = global.Ix;
var root = global.Ix;
root.assertionHelper = {
noNext: function (sequence) {
ok(!sequence.moveNext(), 'Sequence has no next values');
},
hasNext: function (sequence, value) {
ok(sequence.moveNext(), 'Sequence has next value');
equal(value, sequence.getCurrent());
}
};
root.assertionHelper = {
noNext: function (sequence) {
ok(!sequence.moveNext(), 'Sequence has no next values');
},
hasNext: function (sequence, value, predicate) {
ok(sequence.moveNext(), 'Sequence has next value');
if (!predicate) {
equal(value, sequence.getCurrent());
} else {
ok(predicate(value, sequence.getCurrent()));
}
}
};
})(this);

@@ -415,19 +415,19 @@ /*

test('Except', function () {
var xs = Enumerable.range(0, 5);
var ys = Enumerable.range(3, 5);
var xs = Enumerable.fromArray([2.0, 2.1, 2.2, 2.3, 2.4, 2.5]);
var ys = Enumerable.fromArray([2.2]);
var res = xs.except(ys);
ok(res.sequenceEqual(Enumerable.fromArray([5, 6, 7])));
ok(res.sequenceEqual(Enumerable.fromArray([2, 2.1, 2.3, 2.4, 2.5])));
});
test('Except_Comparer', function () {
var xs = Enumerable.fromArray([{value: 1}, {value: 2}]);
var ys = Enumerable.fromArray([{value: 2}, {value: 3}]);
var comparer = function (x, y) { return x.value === y.value; }
var xs = Enumerable.fromArray([{value: 2.0}, {value: 2.1}, {value: 2.2}, {value: 2.3}, {value: 2.4}, {value: 2.5}]);
var ys = Enumerable.fromArray([{value: 2.2}]);
var res = xs.except(ys, function (x, y) { return x.value === y.value; });
var res = xs.except(ys, comparer);
var e = res.getEnumerator();
ok(e.moveNext());
equal(3, e.getCurrent().value);
ok(res.sequenceEqual(Enumerable.fromArray([{value: 2}, {value: 2.1}, {value: 2.3}, {value: 2.4}, {value: 2.5}]), comparer));
});

@@ -1041,4 +1041,147 @@

noNext(res);
});
});
function Pet(name, owner) {
this.name = name;
this.owner = owner;
}
function Person(name) {
this.name = name;
}
test('Join_1', function () {
var magnus = new Person("Hedlund, Magnus");
var terry = new Person("Adams, Terry");
var charlotte = new Person("Weiss, Charlotte");
var barley = new Pet("Barley", terry);
var boots = new Pet("Boots", terry);
var whiskers = new Pet(Name = "Whiskers", charlotte);
var daisy = new Pet("Daisy", magnus);
var people = Enumerable.fromArray([magnus, terry, charlotte]);
var pets = Enumerable.fromArray([barley, boots, whiskers, daisy]);
var query = people.join(
pets,
function (person) { return person; },
function (pet) { return pet.owner; },
function (person, pet) { return { ownerName: person.name, pet: pet.name }; }
);
var res = query.getEnumerator();
var predicate = function (x, y) { return x.ownerName === y.ownerName && x.pet === y.pet; };
hasNext(res, { ownerName: "Hedlund, Magnus", pet: "Daisy"}, predicate);
hasNext(res, { ownerName: "Adams, Terry", pet: "Barley"}, predicate);
hasNext(res, { ownerName: "Adams, Terry", pet: "Boots"}, predicate);
hasNext(res, { ownerName: "Weiss, Charlotte", pet: "Whiskers"}, predicate);
noNext(res);
});
test('Join_2', function () {
var magnus = new Person("Hedlund, Magnus");
var terry = new Person("Adams, Terry");
var charlotte = new Person("Weiss, Charlotte");
var barley = new Pet("Barley", terry);
var boots = new Pet("Boots", terry);
var whiskers = new Pet(Name = "Whiskers", charlotte);
var daisy = new Pet("Daisy", magnus);
var people = Enumerable.fromArray([magnus, terry, charlotte]);
var pets = Enumerable.fromArray([barley, boots, whiskers, daisy]);
var predicate = function (x, y) { return x.ownerName === y.ownerName && x.pet === y.pet; };
var query = people.join(
pets,
function (person) { return person; },
function (pet) { return pet.owner; },
function (person, pet) { return { ownerName: person.name, pet: pet.name }; },
predicate
);
var res = query.getEnumerator();
hasNext(res, { ownerName: "Hedlund, Magnus", pet: "Daisy"}, predicate);
hasNext(res, { ownerName: "Adams, Terry", pet: "Barley"}, predicate);
hasNext(res, { ownerName: "Adams, Terry", pet: "Boots"}, predicate);
hasNext(res, { ownerName: "Weiss, Charlotte", pet: "Whiskers"}, predicate);
noNext(res);
});
test('GroupJoin_1', function () {
var magnus = new Person("Hedlund, Magnus");
var terry = new Person("Adams, Terry");
var charlotte = new Person("Weiss, Charlotte");
var barley = new Pet("Barley", terry);
var boots = new Pet("Boots", terry);
var whiskers = new Pet(Name = "Whiskers", charlotte);
var daisy = new Pet("Daisy", magnus);
var people = Enumerable.fromArray([magnus, terry, charlotte]);
var pets = Enumerable.fromArray([barley, boots, whiskers, daisy]);
var query = people.groupJoin(
pets,
function (person) { return person; },
function (pet) { return pet.owner; },
function (person, petCollection) {
return {
ownerName: person.name,
pets: petCollection.select(function (pet) { return pet.name; })
};
}
);
var res = query.getEnumerator();
var predicate = function (x, y) { return x.ownerName === y.ownerName && x.pets.sequenceEqual(y.pets); };
hasNext(res, { ownerName: "Hedlund, Magnus", pets: Enumerable.fromArray(["Daisy"]) }, predicate);
hasNext(res, { ownerName: "Adams, Terry", pets: Enumerable.fromArray(["Barley", "Boots"]) }, predicate);
hasNext(res, { ownerName: "Weiss, Charlotte", pets: Enumerable.fromArray(["Whiskers"]) }, predicate);
noNext(res);
});
test('GroupJoin_2', function () {
var magnus = new Person("Hedlund, Magnus");
var terry = new Person("Adams, Terry");
var charlotte = new Person("Weiss, Charlotte");
var barley = new Pet("Barley", terry);
var boots = new Pet("Boots", terry);
var whiskers = new Pet(Name = "Whiskers", charlotte);
var daisy = new Pet("Daisy", magnus);
var people = Enumerable.fromArray([magnus, terry, charlotte]);
var pets = Enumerable.fromArray([barley, boots, whiskers, daisy]);
var predicate = function (x, y) { return x.ownerName === y.ownerName && x.pet === y.pet; };
var query = people.groupJoin(
pets,
function (person) { return person; },
function (pet) { return pet.owner; },
function (person, petCollection) {
return {
ownerName: person.name,
pets: petCollection.select(function (pet) { return pet.name; })
};
},
predicate
);
var res = query.getEnumerator();
var predicate = function (x, y) { return x.ownerName === y.ownerName && x.pets.sequenceEqual(y.pets); };
hasNext(res, { ownerName: "Hedlund, Magnus", pets: Enumerable.fromArray(["Daisy"]) }, predicate);
hasNext(res, { ownerName: "Adams, Terry", pets: Enumerable.fromArray(["Barley", "Boots"]) }, predicate);
hasNext(res, { ownerName: "Weiss, Charlotte", pets: Enumerable.fromArray(["Whiskers"]) }, predicate);
noNext(res);
});
}(this));

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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