New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sequency

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sequency - npm Package Compare versions

Comparing version 0.16.0 to 0.17.0

2

lib-umd/sequency.min.js

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

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Sequency",[],e):"object"==typeof exports?exports.Sequency=e():t.Sequency=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){function r(t,e){e.forEach(function(e){Object.getOwnPropertyNames(e.prototype).forEach(function(n){t.prototype[n]=e.prototype[n]})})}function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return u(t)}function i(){return u([])}function u(t){if(null===t)throw new Error("Cannot create sequence for input: null");if(void 0===t)throw new Error("Cannot create sequence for input: undefined");if(null==t[Symbol.iterator])throw new Error("Cannot create sequence for non-iterable input: "+t);return s(new p.IterableIterator(t))}function s(t){return new gt(t)}function a(t){return t instanceof gt}function f(t){r(gt,[t])}function c(t,e){if("function"==typeof t&&null==e)return s(new p.GeneratorIterator(t));var n="function"==typeof t?t():t;return null!=n?s(new p.GeneratorSeedIterator(n,e)):i()}function h(t,e,n){if(void 0===n&&(n=1),t>=e)throw new Error("startInclusive ["+t+"] must be lower then endExclusive ["+e+"]");if(t===e-1)return i();var r=t;return c(function(){try{return r<e?r:void 0}finally{r+=n}})}Object.defineProperty(e,"__esModule",{value:!0});var p=n(1),l=n(2),d=n(3),v=n(4),x=n(5),y=n(6),_=n(7),N=n(8),O=n(9),m=n(10),M=n(11),b=n(12),I=n(13),j=n(14),P=n(15),S=n(16),w=n(17),g=n(18),q=n(19),E=n(20),F=n(21),A=n(22),B=n(23),D=n(24),W=n(25),k=n(26),T=n(27),C=n(28),L=n(29),G=n(30),R=n(31),z=n(32),J=n(33),U=n(34),Z=n(35),H=n(36),K=n(37),Q=n(38),V=n(39),X=n(40),Y=n(41),$=n(42),tt=n(43),et=n(44),nt=n(45),rt=n(46),ot=n(47),it=n(48),ut=n(49),st=n(50),at=n(51),ft=n(52),ct=n(53),ht=n(54),pt=n(55),lt=n(56),dt=n(57),vt=n(59),xt=n(60),yt=n(61),_t=n(62),Nt=n(63),Ot=n(64),mt=n(65),Mt=n(66),bt=n(67),It=n(68),jt=n(69),Pt=n(70),St=n(71),wt=n(72),gt=function(){function t(t){this.iterator=t}return t}();r(gt,[l.All,d.Any,v.AsIterable,x.Associate,y.AssociateBy,_.Average,N.Chunk,O.Contains,m.Count,M.Distinct,b.DistinctBy,I.Drop,j.DropWhile,P.ElementAt,S.ElementAtOrElse,w.ElementAtOrNull,g.Filter,q.FilterIndexed,E.FilterNot,F.FilterNotNull,A.First,B.FirstOrNull,D.FlatMap,W.Flatten,k.Fold,T.FoldIndexed,C.ForEach,L.ForEachIndexed,G.GroupBy,R.IndexOf,z.IndexOfFirst,J.IndexOfLast,U.JoinToString,Z.Last,H.LastOrNull,K.Map,Q.MapIndexed,V.MapNotNull,X.Max,Y.MaxBy,$.MaxWith,tt.Merge,et.Min,nt.MinBy,rt.Minus,ot.MinWith,it.None,ut.OnEach,st.Partition,at.Plus,ft.Reduce,ct.ReduceIndexed,ht.Reverse,pt.Single,lt.SingleOrNull,dt.Sorted,vt.SortedBy,xt.SortedByDescending,yt.SortedDescending,_t.SortedWith,Nt.Sum,Ot.SumBy,mt.Take,Mt.TakeWhile,bt.ToArray,It.ToMap,jt.ToSet,Pt.Unzip,St.WithIndex,wt.Zip]),e.sequenceOf=o,e.emptySequence=i,e.asSequence=u,e.createSequence=s,e.isSequence=a,e.extendSequence=f,e.generateSequence=c,e.range=h},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.done=!1,this.iterator=t[Symbol.iterator]()}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(!this.done&&void 0===this.nextItem){var t=this.iterator.next(),e=t.done,n=t.value;e?(this.done=e,this.nextItem=void 0):this.nextItem=n}},t}();e.IterableIterator=n;var r=function(){function t(t){this.nextFunction=t,this.done=!1}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(!this.done&&void 0===this.nextItem){var t=this.nextFunction();null==t?this.done=!0:this.nextItem=t}},t}();e.GeneratorIterator=r;var o=function(){function t(t,e){this.seed=t,this.nextFunction=e,this.nextItem=this.seed,this.done=!1}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.prevItem=t,this.nextItem=void 0,t},t.prototype.processNext=function(){if(!this.done&&void 0===this.nextItem){var t=this.nextFunction(this.prevItem);null==t?this.done=!0:(this.prevItem=this.nextItem,this.nextItem=t)}},t}();e.GeneratorSeedIterator=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.all=function(t){for(;this.iterator.hasNext();){if(!t(this.iterator.next()))return!1}return!0},t}();e.All=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.any=function(t){if(null==t)return this.iterator.hasNext();for(;this.iterator.hasNext();){if(t(this.iterator.next()))return!0}return!1},t}();e.Any=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.asIterable=function(){var t=this.iterator;return e={},e[Symbol.iterator]=function(){return{next:function(){return t.hasNext()?{done:!1,value:t.next()}:{done:!0,value:void 0}}}},e;var e},t}();e.AsIterable=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.associate=function(t){for(var e=new Map;this.iterator.hasNext();){var n=this.iterator.next(),r=t(n);e.set(r[0],r[1])}return e},t}();e.Associate=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.associateBy=function(t,e){for(var n="function"==typeof t?t:function(e){return e[t]},r=new Map,o=null!=e?e:function(t){return t};this.iterator.hasNext();){var i=this.iterator.next(),u=n(i),s=o(i);r.set(u,s)}return r},t}();e.AssociateBy=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.average=function(){for(var t=0,e=0;this.iterator.hasNext();)t+=this.iterator.next(),e++;return 0===e?Number.NaN:t/e},t}();e.Average=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.chunk=function(t){if(t<1)throw new Error("chunkSize must be > 0 but is "+t);for(var e=[],n=0;this.iterator.hasNext();){var r=this.iterator.next(),o=Math.floor(n/t);null==e[o]?e[o]=[r]:e[o].push(r),n++}return e},t}();e.Chunk=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.contains=function(t){for(;this.iterator.hasNext();){if(t===this.iterator.next())return!0}return!1},t}();e.Contains=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.count=function(t){var e=0;if(null==t)for(;this.iterator.hasNext();)this.iterator.next(),e++;else for(;this.iterator.hasNext();){var n=this.iterator.next();t(n)&&e++}return e},t}();e.Count=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t){this.iterator=t,this.items=[],this.nextItem=void 0,this.done=!1}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(void 0===this.nextItem&&!this.done){for(;this.iterator.hasNext();){var t=this.iterator.next();if(this.items.indexOf(t)<0)return this.nextItem=t,void this.items.push(t)}this.done=!0}},t}(),i=function(){function t(){}return t.prototype.distinct=function(){return r.createSequence(new o(this.iterator))},t}();e.Distinct=i},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.iterator=t,this.selector=e,this.keys=[],this.done=!1}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(void 0===this.nextItem&&!this.done){for(;this.iterator.hasNext();){var t=this.iterator.next(),e=this.selector(t);if(this.keys.indexOf(e)<0)return this.nextItem=t,void this.keys.push(e)}this.done=!0}},t}(),i=function(){function t(){}return t.prototype.distinctBy=function(t){return r.createSequence(new o(this.iterator,t))},t}();e.DistinctBy=i},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.drop=function(t){return this.withIndex().dropWhile(function(e){return e.index<t}).map(function(t){return t.value})},t}();e.Drop=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.iterator=t,this.predicate=e,this.done=!1,this.dropping=!0}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(!this.done&&void 0===this.nextItem){for(;this.iterator.hasNext();){var t=this.iterator.next();if(!this.dropping)return void(this.nextItem=t);if(!this.predicate(t))return this.dropping=!1,void(this.nextItem=t)}this.done=!0}},t}(),i=function(){function t(){}return t.prototype.dropWhile=function(t){return r.createSequence(new o(this.iterator,t))},t}();e.DropWhile=i},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.elementAt=function(t){for(var e=0;this.iterator.hasNext();){var n=this.iterator.next();if(e===t)return n;e++}throw new Error("Index out of bounds: "+t)},t}();e.ElementAt=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.elementAtOrElse=function(t,e){for(var n=0;this.iterator.hasNext();){var r=this.iterator.next();if(n===t)return r;n++}return e(t)},t}();e.ElementAtOrElse=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.elementAtOrNull=function(t){for(var e=0;this.iterator.hasNext();){var n=this.iterator.next();if(e===t)return n;e++}return null},t}();e.ElementAtOrNull=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.predicate=t,this.iterator=e,this.done=!1}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(!this.done&&void 0===this.nextItem){for(;this.iterator.hasNext();){var t=this.iterator.next();if(this.predicate(t))return void(this.nextItem=t)}this.done=!0}},t}(),i=function(){function t(){}return t.prototype.filter=function(t){return r.createSequence(new o(t,this.iterator))},t}();e.Filter=i},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.filterIndexed=function(t){return this.withIndex().filter(function(e){return t(e.index,e.value)}).map(function(t){return t.value})},t}();e.FilterIndexed=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.filterNot=function(t){return this.filter(function(e){return!t(e)})},t}();e.FilterNot=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.filterNotNull=function(){return this.filter(function(t){return null!==t})},t}();e.FilterNotNull=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.first=function(t){if(null!=t)return this.filter(t).first();if(!this.iterator.hasNext())throw new Error("No such element");return this.iterator.next()},t}();e.First=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.firstOrNull=function(t){return null!=t?this.filter(t).firstOrNull():this.iterator.hasNext()?this.iterator.next():null},t.prototype.find=function(t){return this.firstOrNull(t)},t}();e.FirstOrNull=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.transform=t,this.iterator=e}return t.prototype.next=function(){return this.processNext(),this.current.next()},t.prototype.hasNext=function(){return this.processNext(),null!=this.current},t.prototype.processNext=function(){if(null!=this.current){if(this.current.hasNext())return;this.current=void 0}for(;null==this.current&&this.iterator.hasNext();){var t=this.iterator.next(),e=this.transform(t);e.iterator.hasNext()&&(this.current=e.iterator)}},t}(),i=function(){function t(){}return t.prototype.flatMap=function(t){return r.createSequence(new o(t,this.iterator))},t}();e.FlatMap=i},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(){}return t.prototype.flatten=function(){return this.flatMap(function(t){return r.isSequence(t)?t:r.asSequence(t)})},t}();e.Flatten=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.fold=function(t,e){for(var n=t;this.iterator.hasNext();){n=e(n,this.iterator.next())}return n},t}();e.Fold=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.foldIndexed=function(t,e){for(var n=t,r=0;this.iterator.hasNext();){n=e(r,n,this.iterator.next()),r++}return n},t}();e.FoldIndexed=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.forEach=function(t){for(;this.iterator.hasNext();){t(this.iterator.next())}},t}();e.ForEach=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.forEachIndexed=function(t){this.withIndex().forEach(function(e){return t(e.index,e.value)})},t}();e.ForEachIndexed=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.groupBy=function(t){for(var e=new Map;this.iterator.hasNext();){var n=this.iterator.next(),r=t(n),o=e.get(r);null==o?e.set(r,[n]):o.push(n)}return e},t}();e.GroupBy=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.indexOf=function(t){for(var e=0;this.iterator.hasNext();){if(this.iterator.next()===t)return e;e++}return-1},t}();e.IndexOf=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.indexOfFirst=function(t){for(var e=0;this.iterator.hasNext();){if(t(this.iterator.next()))return e;e++}return-1},t}();e.IndexOfFirst=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.indexOfLast=function(t){for(var e=0,n=-1;this.iterator.hasNext();){t(this.iterator.next())&&(n=e),e++}return n},t}();e.IndexOfLast=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n={value:"",separator:", ",prefix:"",postfix:"",limit:-1,truncated:"...",transform:void 0},r=function(){function t(){}return t.prototype.joinToString=function(t){void 0===t&&(t=n);for(var e=t.value,r=void 0===e?n.value:e,o=t.separator,i=void 0===o?n.separator:o,u=t.prefix,s=void 0===u?n.prefix:u,a=t.postfix,f=void 0===a?n.postfix:a,c=t.limit,h=void 0===c?n.limit:c,p=t.truncated,l=void 0===p?n.truncated:p,d=t.transform,v=void 0===d?n.transform:d,x=""+r+s,y=0;this.iterator.hasNext();){y++;var _=this.iterator.next();if(y>1&&(x+=i),!(h<0||y<=h))break;x+=null!=v?v(_):String(_)}return h>=0&&y>h&&(x+=l),x+=f},t.prototype.joinTo=function(t){return void 0===t&&(t=n),this.joinToString(t)},t}();e.JoinToString=r},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.last=function(t){if(null!=t)return this.filter(t).last();if(!this.iterator.hasNext())throw new Error("No such element");for(var e;this.iterator.hasNext();)e=this.iterator.next();return e},t}();e.Last=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.lastOrNull=function(t){if(null!=t)return this.filter(t).lastOrNull();for(var e=null;this.iterator.hasNext();)e=this.iterator.next();return e},t.prototype.findLast=function(t){return this.lastOrNull(t)},t}();e.LastOrNull=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.transform=t,this.iterator=e}return t.prototype.hasNext=function(){return this.iterator.hasNext()},t.prototype.next=function(){var t=this.iterator.next();return this.transform(t)},t}(),i=function(){function t(){}return t.prototype.map=function(t){return r.createSequence(new o(t,this.iterator))},t}();e.Map=i},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.mapIndexed=function(t){return this.withIndex().map(function(e){return t(e.index,e.value)})},t}();e.MapIndexed=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(){}return t.prototype.mapNotNull=function(t){return this.flatMap(function(e){var n=t(e);return null!==n?r.sequenceOf(n):r.emptySequence()})},t}();e.MapNotNull=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.max=function(){for(var t=null;this.iterator.hasNext();){var e=this.iterator.next();(null==t||e>t)&&(t=e)}return t},t}();e.Max=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.maxBy=function(t){for(var e=null,n=null;this.iterator.hasNext();){var r=this.iterator.next(),o=t(r);(null==n||o>n)&&(n=o,e=r)}return e},t}();e.MaxBy=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.maxWith=function(t){for(var e=null;this.iterator.hasNext();){var n=this.iterator.next();(null==e||t(n,e)>0)&&(e=n)}return e},t}();e.MaxWith=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(){}return t.prototype.merge=function(t,e,n){void 0===n&&(n=!1);var o=r.isSequence(t)?t.toArray():r.asSequence(t).toArray(),i=this.toArray(),u=i.map(function(t){var n=e(t),i=r.asSequence(o).find(function(t){return e(t)===n});return null!=i?(o=o.filter(function(t){return t!==i}),i):t});return n?r.asSequence(o.concat(u)):r.asSequence(u.concat(o))},t}();e.Merge=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.min=function(){for(var t=null;this.iterator.hasNext();){var e=this.iterator.next();(null==t||e<t)&&(t=e)}return t},t}();e.Min=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.minBy=function(t){for(var e=null,n=null;this.iterator.hasNext();){var r=this.iterator.next(),o=t(r);(null==n||o<n)&&(n=o,e=r)}return e},t}();e.MinBy=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(){}return t.prototype.minus=function(t){if(r.isSequence(t)){var e=t.toArray();return this.filter(function(t){return e.indexOf(t)<0})}return t instanceof Array?this.filter(function(e){return t.indexOf(e)<0}):this.filter(function(e){return e!==t})},t}();e.Minus=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.minWith=function(t){for(var e=null;this.iterator.hasNext();){var n=this.iterator.next();(null==e||t(n,e)<0)&&(e=n)}return e},t}();e.MinWith=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.none=function(t){if(null==t)return!this.iterator.hasNext();for(;this.iterator.hasNext();){if(t(this.iterator.next()))return!1}return!0},t}();e.None=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.onEach=function(t){return this.map(function(e){return t(e),e})},t}();e.OnEach=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.partition=function(t){for(var e=[],n=[];this.iterator.hasNext();){var r=this.iterator.next();t(r)?e.push(r):n.push(r)}return{true:e,false:n}},t}();e.Partition=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(){function t(t,e){this.first=t,this.second=e}return t.prototype.hasNext=function(){return this.first.hasNext()||this.second.hasNext()},t.prototype.next=function(){return this.first.hasNext()?this.first.next():this.second.next()},t}(),u=function(){function t(){}return t.prototype.plus=function(t){return r.isSequence(t)?r.createSequence(new i(this.iterator,t.iterator)):t instanceof Array?r.createSequence(new i(this.iterator,new o.IterableIterator(t))):r.createSequence(new i(this.iterator,new o.IterableIterator([t])))},t}();e.Plus=u},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.reduce=function(t){if(!this.iterator.hasNext())throw new Error("Cannot reduce empty sequence");for(var e=this.iterator.next();this.iterator.hasNext();){e=t(e,this.iterator.next())}return e},t}();e.Reduce=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.reduceIndexed=function(t){if(!this.iterator.hasNext())throw new Error("Cannot reduce empty sequence");for(var e=1,n=this.iterator.next();this.iterator.hasNext();){n=t(e,n,this.iterator.next()),e++}return n},t}();e.ReduceIndexed=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.reverse=function(){return this.withIndex().sortedByDescending(function(t){return t.index}).map(function(t){return t.value})},t}();e.Reverse=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.single=function(t){if(null!=t)return this.filter(t).single();if(!this.iterator.hasNext())throw new Error("No such element");var e=this.iterator.next();if(this.iterator.hasNext())throw new Error("Expect single element");return e},t}();e.Single=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.singleOrNull=function(t){if(null!=t)return this.filter(t).singleOrNull();if(!this.iterator.hasNext())return null;var e=this.iterator.next();return this.iterator.hasNext()?null:e},t}();e.SingleOrNull=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(58),u=function(){function t(){}return t.prototype.sorted=function(t){for(var e=[];this.iterator.hasNext();){var n=this.iterator.next();e.push(n)}if(null==t)e.sort();else{var u=i.default(),s=t(u);e.sort(s)}return r.createSequence(new o.IterableIterator(e))},t}();e.Sorted=u},function(t,e){function n(t){return Object.assign(t,{reversed:function(){return n(function(e,n){return-1*t(e,n)})},then:function(e){return n(function(n,r){var o=t(n,r);return 0!==o?o:e(n,r)})},thenDescending:function(t){return this.then(n(t).reversed())},thenBy:function(t){var e=h(t);return this.then(function(t,n){return c(e(t),e(n))})},thenByDescending:function(t){var e=h(t);return this.then(n(function(t,n){return c(e(t),e(n))}).reversed())}})}function r(t){var e=h(t);return n(function(t,n){return c(e(t),e(n))})}function o(t){var e=h(t);return n(function(t,n){return c(e(n),e(t))})}function i(){return n(c)}function u(){return n(c).reversed()}function s(){return n(function(t,e){return null===t?1:null===e?-1:0})}function a(){return n(function(t,e){return null===t?-1:null===e?1:0})}function f(){return{compare:n,compareBy:r,compareByDescending:o,naturalOrder:i,reverseOrder:u,nullsFirst:a,nullsLast:s}}Object.defineProperty(e,"__esModule",{value:!0});var c=function(t,e){return t<e?-1:t>e?1:0},h=function(t){return"function"==typeof t?t:function(e){return e[t]}};e.default=f},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.sortedBy=function(t){return this.sorted(function(e){return e.compareBy(t)})},t}();e.SortedBy=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.sortedByDescending=function(t){return this.sorted(function(e){return e.compareByDescending(t)})},t}();e.SortedByDescending=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.sortedDescending=function(){return this.sorted(function(t){return t.reverseOrder()})},t}();e.SortedDescending=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.sortedWith=function(t){return this.sorted(function(e){return e.compare(t)})},t}();e.SortedWith=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.sum=function(){for(var t=0;this.iterator.hasNext();)t+=this.iterator.next();return t},t}();e.Sum=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.sumBy=function(t){for(var e=0;this.iterator.hasNext();){e+=t(this.iterator.next())}return e},t}();e.SumBy=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.take=function(t){return this.withIndex().takeWhile(function(e){return e.index<t}).map(function(t){return t.value})},t}();e.Take=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.iterator=t,this.predicate=e,this.done=!1}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(!this.done&&void 0===this.nextItem){if(this.iterator.hasNext()){var t=this.iterator.next();if(this.predicate(t))return void(this.nextItem=t)}this.done=!0}},t}(),i=function(){function t(){}return t.prototype.takeWhile=function(t){return r.createSequence(new o(this.iterator,t))},t}();e.TakeWhile=i},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.toArray=function(t){for(var e=t||[];this.iterator.hasNext();)e.push(this.iterator.next());return e},t.prototype.toList=function(t){return this.toArray(t)},t}();e.ToArray=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.toMap=function(t){for(var e=t||new Map;this.iterator.hasNext();){var n=this.iterator.next(),r=n[0],o=n[1];e.set(r,o)}return e},t}();e.ToMap=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.toSet=function(t){for(var e=t||new Set;this.iterator.hasNext();){var n=this.iterator.next();e.add(n)}return e},t}();e.ToSet=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.unzip=function(){for(var t=[],e=[];this.iterator.hasNext();){var n=this.iterator.next(),r=n[0],o=n[1];t.push(r),e.push(o)}return[t,e]},t}();e.Unzip=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t){this.iterator=t,this.index=-1}return t.prototype.hasNext=function(){return this.iterator.hasNext()},t.prototype.next=function(){var t=this.iterator.next();return this.index++,{index:this.index,value:t}},t}(),i=function(){function t(){}return t.prototype.withIndex=function(){return r.createSequence(new o(this.iterator))},t}();e.WithIndex=i},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.iterator1=t,this.iterator2=e}return t.prototype.hasNext=function(){return this.iterator1.hasNext()&&this.iterator2.hasNext()},t.prototype.next=function(){return[this.iterator1.next(),this.iterator2.next()]},t}(),i=function(){function t(){}return t.prototype.zip=function(t){return r.createSequence(new o(this.iterator,t.iterator))},t}();e.Zip=i}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Sequency",[],e):"object"==typeof exports?exports.Sequency=e():t.Sequency=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){function r(t,e){e.forEach(function(e){Object.getOwnPropertyNames(e.prototype).forEach(function(n){t.prototype[n]=e.prototype[n]})})}function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return u(t)}function i(){return u([])}function u(t){if(null===t)throw new Error("Cannot create sequence for input: null");if(void 0===t)throw new Error("Cannot create sequence for input: undefined");if(null==t[Symbol.iterator])throw new Error("Cannot create sequence for non-iterable input: "+t);return s(new p.IterableIterator(t))}function s(t){return new gt(t)}function a(t){return t instanceof gt}function f(t){r(gt,[t])}function c(t,e){if("function"==typeof t&&null==e)return s(new p.GeneratorIterator(t));var n="function"==typeof t?t():t;return null!=n?s(new p.GeneratorSeedIterator(n,e)):i()}function h(t,e,n){if(void 0===n&&(n=1),t>e)throw new Error("start ["+t+"] must be lower then endInclusive ["+e+"]");if(t===e)return i();var r=t;return c(function(){try{return r<=e?r:void 0}finally{r+=n}})}Object.defineProperty(e,"__esModule",{value:!0});var p=n(1),l=n(2),d=n(3),v=n(4),x=n(5),y=n(6),_=n(7),N=n(8),O=n(9),m=n(10),M=n(11),b=n(12),I=n(13),j=n(14),P=n(15),S=n(16),w=n(17),g=n(18),q=n(19),E=n(20),F=n(21),A=n(22),B=n(23),D=n(24),W=n(25),k=n(26),T=n(27),C=n(28),L=n(29),G=n(30),R=n(31),z=n(32),J=n(33),U=n(34),Z=n(35),H=n(36),K=n(37),Q=n(38),V=n(39),X=n(40),Y=n(41),$=n(42),tt=n(43),et=n(44),nt=n(45),rt=n(46),ot=n(47),it=n(48),ut=n(49),st=n(50),at=n(51),ft=n(52),ct=n(53),ht=n(54),pt=n(55),lt=n(56),dt=n(57),vt=n(59),xt=n(60),yt=n(61),_t=n(62),Nt=n(63),Ot=n(64),mt=n(65),Mt=n(66),bt=n(67),It=n(68),jt=n(69),Pt=n(70),St=n(71),wt=n(72),gt=function(){function t(t){this.iterator=t}return t}();r(gt,[l.All,d.Any,v.AsIterable,x.Associate,y.AssociateBy,_.Average,N.Chunk,O.Contains,m.Count,M.Distinct,b.DistinctBy,I.Drop,j.DropWhile,P.ElementAt,S.ElementAtOrElse,w.ElementAtOrNull,g.Filter,q.FilterIndexed,E.FilterNot,F.FilterNotNull,A.First,B.FirstOrNull,D.FlatMap,W.Flatten,k.Fold,T.FoldIndexed,C.ForEach,L.ForEachIndexed,G.GroupBy,R.IndexOf,z.IndexOfFirst,J.IndexOfLast,U.JoinToString,Z.Last,H.LastOrNull,K.Map,Q.MapIndexed,V.MapNotNull,X.Max,Y.MaxBy,$.MaxWith,tt.Merge,et.Min,nt.MinBy,rt.Minus,ot.MinWith,it.None,ut.OnEach,st.Partition,at.Plus,ft.Reduce,ct.ReduceIndexed,ht.Reverse,pt.Single,lt.SingleOrNull,dt.Sorted,vt.SortedBy,xt.SortedByDescending,yt.SortedDescending,_t.SortedWith,Nt.Sum,Ot.SumBy,mt.Take,Mt.TakeWhile,bt.ToArray,It.ToMap,jt.ToSet,Pt.Unzip,St.WithIndex,wt.Zip]),e.sequenceOf=o,e.emptySequence=i,e.asSequence=u,e.createSequence=s,e.isSequence=a,e.extendSequence=f,e.generateSequence=c,e.range=h},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.done=!1,this.iterator=t[Symbol.iterator]()}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(!this.done&&void 0===this.nextItem){var t=this.iterator.next(),e=t.done,n=t.value;e?(this.done=e,this.nextItem=void 0):this.nextItem=n}},t}();e.IterableIterator=n;var r=function(){function t(t){this.nextFunction=t,this.done=!1}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(!this.done&&void 0===this.nextItem){var t=this.nextFunction();null==t?this.done=!0:this.nextItem=t}},t}();e.GeneratorIterator=r;var o=function(){function t(t,e){this.seed=t,this.nextFunction=e,this.nextItem=this.seed,this.done=!1}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.prevItem=t,this.nextItem=void 0,t},t.prototype.processNext=function(){if(!this.done&&void 0===this.nextItem){var t=this.nextFunction(this.prevItem);null==t?this.done=!0:(this.prevItem=this.nextItem,this.nextItem=t)}},t}();e.GeneratorSeedIterator=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.all=function(t){for(;this.iterator.hasNext();){if(!t(this.iterator.next()))return!1}return!0},t}();e.All=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.any=function(t){if(null==t)return this.iterator.hasNext();for(;this.iterator.hasNext();){if(t(this.iterator.next()))return!0}return!1},t}();e.Any=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.asIterable=function(){var t=this.iterator;return e={},e[Symbol.iterator]=function(){return{next:function(){return t.hasNext()?{done:!1,value:t.next()}:{done:!0,value:void 0}}}},e;var e},t}();e.AsIterable=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.associate=function(t){for(var e=new Map;this.iterator.hasNext();){var n=this.iterator.next(),r=t(n);e.set(r[0],r[1])}return e},t}();e.Associate=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.associateBy=function(t,e){for(var n="function"==typeof t?t:function(e){return e[t]},r=new Map,o=null!=e?e:function(t){return t};this.iterator.hasNext();){var i=this.iterator.next(),u=n(i),s=o(i);r.set(u,s)}return r},t}();e.AssociateBy=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.average=function(){for(var t=0,e=0;this.iterator.hasNext();)t+=this.iterator.next(),e++;return 0===e?Number.NaN:t/e},t}();e.Average=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.chunk=function(t){if(t<1)throw new Error("chunkSize must be > 0 but is "+t);for(var e=[],n=0;this.iterator.hasNext();){var r=this.iterator.next(),o=Math.floor(n/t);null==e[o]?e[o]=[r]:e[o].push(r),n++}return e},t}();e.Chunk=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.contains=function(t){for(;this.iterator.hasNext();){if(t===this.iterator.next())return!0}return!1},t}();e.Contains=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.count=function(t){var e=0;if(null==t)for(;this.iterator.hasNext();)this.iterator.next(),e++;else for(;this.iterator.hasNext();){var n=this.iterator.next();t(n)&&e++}return e},t}();e.Count=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t){this.iterator=t,this.items=[],this.nextItem=void 0,this.done=!1}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(void 0===this.nextItem&&!this.done){for(;this.iterator.hasNext();){var t=this.iterator.next();if(this.items.indexOf(t)<0)return this.nextItem=t,void this.items.push(t)}this.done=!0}},t}(),i=function(){function t(){}return t.prototype.distinct=function(){return r.createSequence(new o(this.iterator))},t}();e.Distinct=i},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.iterator=t,this.selector=e,this.keys=[],this.done=!1}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(void 0===this.nextItem&&!this.done){for(;this.iterator.hasNext();){var t=this.iterator.next(),e=this.selector(t);if(this.keys.indexOf(e)<0)return this.nextItem=t,void this.keys.push(e)}this.done=!0}},t}(),i=function(){function t(){}return t.prototype.distinctBy=function(t){return r.createSequence(new o(this.iterator,t))},t}();e.DistinctBy=i},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.drop=function(t){return this.withIndex().dropWhile(function(e){return e.index<t}).map(function(t){return t.value})},t}();e.Drop=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.iterator=t,this.predicate=e,this.done=!1,this.dropping=!0}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(!this.done&&void 0===this.nextItem){for(;this.iterator.hasNext();){var t=this.iterator.next();if(!this.dropping)return void(this.nextItem=t);if(!this.predicate(t))return this.dropping=!1,void(this.nextItem=t)}this.done=!0}},t}(),i=function(){function t(){}return t.prototype.dropWhile=function(t){return r.createSequence(new o(this.iterator,t))},t}();e.DropWhile=i},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.elementAt=function(t){for(var e=0;this.iterator.hasNext();){var n=this.iterator.next();if(e===t)return n;e++}throw new Error("Index out of bounds: "+t)},t}();e.ElementAt=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.elementAtOrElse=function(t,e){for(var n=0;this.iterator.hasNext();){var r=this.iterator.next();if(n===t)return r;n++}return e(t)},t}();e.ElementAtOrElse=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.elementAtOrNull=function(t){for(var e=0;this.iterator.hasNext();){var n=this.iterator.next();if(e===t)return n;e++}return null},t}();e.ElementAtOrNull=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.predicate=t,this.iterator=e,this.done=!1}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(!this.done&&void 0===this.nextItem){for(;this.iterator.hasNext();){var t=this.iterator.next();if(this.predicate(t))return void(this.nextItem=t)}this.done=!0}},t}(),i=function(){function t(){}return t.prototype.filter=function(t){return r.createSequence(new o(t,this.iterator))},t}();e.Filter=i},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.filterIndexed=function(t){return this.withIndex().filter(function(e){return t(e.index,e.value)}).map(function(t){return t.value})},t}();e.FilterIndexed=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.filterNot=function(t){return this.filter(function(e){return!t(e)})},t}();e.FilterNot=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.filterNotNull=function(){return this.filter(function(t){return null!==t})},t}();e.FilterNotNull=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.first=function(t){if(null!=t)return this.filter(t).first();if(!this.iterator.hasNext())throw new Error("No such element");return this.iterator.next()},t}();e.First=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.firstOrNull=function(t){return null!=t?this.filter(t).firstOrNull():this.iterator.hasNext()?this.iterator.next():null},t.prototype.find=function(t){return this.firstOrNull(t)},t}();e.FirstOrNull=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.transform=t,this.iterator=e}return t.prototype.next=function(){return this.processNext(),this.current.next()},t.prototype.hasNext=function(){return this.processNext(),null!=this.current},t.prototype.processNext=function(){if(null!=this.current){if(this.current.hasNext())return;this.current=void 0}for(;null==this.current&&this.iterator.hasNext();){var t=this.iterator.next(),e=this.transform(t);e.iterator.hasNext()&&(this.current=e.iterator)}},t}(),i=function(){function t(){}return t.prototype.flatMap=function(t){return r.createSequence(new o(t,this.iterator))},t}();e.FlatMap=i},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(){}return t.prototype.flatten=function(){return this.flatMap(function(t){return r.isSequence(t)?t:r.asSequence(t)})},t}();e.Flatten=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.fold=function(t,e){for(var n=t;this.iterator.hasNext();){n=e(n,this.iterator.next())}return n},t}();e.Fold=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.foldIndexed=function(t,e){for(var n=t,r=0;this.iterator.hasNext();){n=e(r,n,this.iterator.next()),r++}return n},t}();e.FoldIndexed=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.forEach=function(t){for(;this.iterator.hasNext();){t(this.iterator.next())}},t}();e.ForEach=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.forEachIndexed=function(t){this.withIndex().forEach(function(e){return t(e.index,e.value)})},t}();e.ForEachIndexed=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.groupBy=function(t){for(var e=new Map;this.iterator.hasNext();){var n=this.iterator.next(),r=t(n),o=e.get(r);null==o?e.set(r,[n]):o.push(n)}return e},t}();e.GroupBy=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.indexOf=function(t){for(var e=0;this.iterator.hasNext();){if(this.iterator.next()===t)return e;e++}return-1},t}();e.IndexOf=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.indexOfFirst=function(t){for(var e=0;this.iterator.hasNext();){if(t(this.iterator.next()))return e;e++}return-1},t}();e.IndexOfFirst=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.indexOfLast=function(t){for(var e=0,n=-1;this.iterator.hasNext();){t(this.iterator.next())&&(n=e),e++}return n},t}();e.IndexOfLast=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n={value:"",separator:", ",prefix:"",postfix:"",limit:-1,truncated:"...",transform:void 0},r=function(){function t(){}return t.prototype.joinToString=function(t){void 0===t&&(t=n);for(var e=t.value,r=void 0===e?n.value:e,o=t.separator,i=void 0===o?n.separator:o,u=t.prefix,s=void 0===u?n.prefix:u,a=t.postfix,f=void 0===a?n.postfix:a,c=t.limit,h=void 0===c?n.limit:c,p=t.truncated,l=void 0===p?n.truncated:p,d=t.transform,v=void 0===d?n.transform:d,x=""+r+s,y=0;this.iterator.hasNext();){y++;var _=this.iterator.next();if(y>1&&(x+=i),!(h<0||y<=h))break;x+=null!=v?v(_):String(_)}return h>=0&&y>h&&(x+=l),x+=f},t.prototype.joinTo=function(t){return void 0===t&&(t=n),this.joinToString(t)},t}();e.JoinToString=r},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.last=function(t){if(null!=t)return this.filter(t).last();if(!this.iterator.hasNext())throw new Error("No such element");for(var e;this.iterator.hasNext();)e=this.iterator.next();return e},t}();e.Last=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.lastOrNull=function(t){if(null!=t)return this.filter(t).lastOrNull();for(var e=null;this.iterator.hasNext();)e=this.iterator.next();return e},t.prototype.findLast=function(t){return this.lastOrNull(t)},t}();e.LastOrNull=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.transform=t,this.iterator=e}return t.prototype.hasNext=function(){return this.iterator.hasNext()},t.prototype.next=function(){var t=this.iterator.next();return this.transform(t)},t}(),i=function(){function t(){}return t.prototype.map=function(t){return r.createSequence(new o(t,this.iterator))},t}();e.Map=i},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.mapIndexed=function(t){return this.withIndex().map(function(e){return t(e.index,e.value)})},t}();e.MapIndexed=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(){}return t.prototype.mapNotNull=function(t){return this.flatMap(function(e){var n=t(e);return null!==n?r.sequenceOf(n):r.emptySequence()})},t}();e.MapNotNull=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.max=function(){for(var t=null;this.iterator.hasNext();){var e=this.iterator.next();(null==t||e>t)&&(t=e)}return t},t}();e.Max=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.maxBy=function(t){for(var e=null,n=null;this.iterator.hasNext();){var r=this.iterator.next(),o=t(r);(null==n||o>n)&&(n=o,e=r)}return e},t}();e.MaxBy=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.maxWith=function(t){for(var e=null;this.iterator.hasNext();){var n=this.iterator.next();(null==e||t(n,e)>0)&&(e=n)}return e},t}();e.MaxWith=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(){}return t.prototype.merge=function(t,e,n){void 0===n&&(n=!1);var o=r.isSequence(t)?t.toArray():r.asSequence(t).toArray(),i=this.toArray(),u=i.map(function(t){var n=e(t),i=r.asSequence(o).find(function(t){return e(t)===n});return null!=i?(o=o.filter(function(t){return t!==i}),i):t});return n?r.asSequence(o.concat(u)):r.asSequence(u.concat(o))},t}();e.Merge=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.min=function(){for(var t=null;this.iterator.hasNext();){var e=this.iterator.next();(null==t||e<t)&&(t=e)}return t},t}();e.Min=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.minBy=function(t){for(var e=null,n=null;this.iterator.hasNext();){var r=this.iterator.next(),o=t(r);(null==n||o<n)&&(n=o,e=r)}return e},t}();e.MinBy=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(){}return t.prototype.minus=function(t){if(r.isSequence(t)){var e=t.toArray();return this.filter(function(t){return e.indexOf(t)<0})}return t instanceof Array?this.filter(function(e){return t.indexOf(e)<0}):this.filter(function(e){return e!==t})},t}();e.Minus=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.minWith=function(t){for(var e=null;this.iterator.hasNext();){var n=this.iterator.next();(null==e||t(n,e)<0)&&(e=n)}return e},t}();e.MinWith=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.none=function(t){if(null==t)return!this.iterator.hasNext();for(;this.iterator.hasNext();){if(t(this.iterator.next()))return!1}return!0},t}();e.None=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.onEach=function(t){return this.map(function(e){return t(e),e})},t}();e.OnEach=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.partition=function(t){for(var e=[],n=[];this.iterator.hasNext();){var r=this.iterator.next();t(r)?e.push(r):n.push(r)}return{true:e,false:n}},t}();e.Partition=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(){function t(t,e){this.first=t,this.second=e}return t.prototype.hasNext=function(){return this.first.hasNext()||this.second.hasNext()},t.prototype.next=function(){return this.first.hasNext()?this.first.next():this.second.next()},t}(),u=function(){function t(){}return t.prototype.plus=function(t){return r.isSequence(t)?r.createSequence(new i(this.iterator,t.iterator)):t instanceof Array?r.createSequence(new i(this.iterator,new o.IterableIterator(t))):r.createSequence(new i(this.iterator,new o.IterableIterator([t])))},t}();e.Plus=u},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.reduce=function(t){if(!this.iterator.hasNext())throw new Error("Cannot reduce empty sequence");for(var e=this.iterator.next();this.iterator.hasNext();){e=t(e,this.iterator.next())}return e},t}();e.Reduce=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.reduceIndexed=function(t){if(!this.iterator.hasNext())throw new Error("Cannot reduce empty sequence");for(var e=1,n=this.iterator.next();this.iterator.hasNext();){n=t(e,n,this.iterator.next()),e++}return n},t}();e.ReduceIndexed=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.reverse=function(){return this.withIndex().sortedByDescending(function(t){return t.index}).map(function(t){return t.value})},t}();e.Reverse=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.single=function(t){if(null!=t)return this.filter(t).single();if(!this.iterator.hasNext())throw new Error("No such element");var e=this.iterator.next();if(this.iterator.hasNext())throw new Error("Expect single element");return e},t}();e.Single=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.singleOrNull=function(t){if(null!=t)return this.filter(t).singleOrNull();if(!this.iterator.hasNext())return null;var e=this.iterator.next();return this.iterator.hasNext()?null:e},t}();e.SingleOrNull=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(58),u=function(){function t(){}return t.prototype.sorted=function(t){for(var e=[];this.iterator.hasNext();){var n=this.iterator.next();e.push(n)}if(null==t)e.sort();else{var u=i.default(),s=t(u);e.sort(s)}return r.createSequence(new o.IterableIterator(e))},t}();e.Sorted=u},function(t,e){function n(t){return Object.assign(t,{reversed:function(){return n(function(e,n){return-1*t(e,n)})},then:function(e){return n(function(n,r){var o=t(n,r);return 0!==o?o:e(n,r)})},thenDescending:function(t){return this.then(n(t).reversed())},thenBy:function(t){var e=h(t);return this.then(function(t,n){return c(e(t),e(n))})},thenByDescending:function(t){var e=h(t);return this.then(n(function(t,n){return c(e(t),e(n))}).reversed())}})}function r(t){var e=h(t);return n(function(t,n){return c(e(t),e(n))})}function o(t){var e=h(t);return n(function(t,n){return c(e(n),e(t))})}function i(){return n(c)}function u(){return n(c).reversed()}function s(){return n(function(t,e){return null===t?1:null===e?-1:0})}function a(){return n(function(t,e){return null===t?-1:null===e?1:0})}function f(){return{compare:n,compareBy:r,compareByDescending:o,naturalOrder:i,reverseOrder:u,nullsFirst:a,nullsLast:s}}Object.defineProperty(e,"__esModule",{value:!0});var c=function(t,e){return t<e?-1:t>e?1:0},h=function(t){return"function"==typeof t?t:function(e){return e[t]}};e.default=f},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.sortedBy=function(t){return this.sorted(function(e){return e.compareBy(t)})},t}();e.SortedBy=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.sortedByDescending=function(t){return this.sorted(function(e){return e.compareByDescending(t)})},t}();e.SortedByDescending=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.sortedDescending=function(){return this.sorted(function(t){return t.reverseOrder()})},t}();e.SortedDescending=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.sortedWith=function(t){return this.sorted(function(e){return e.compare(t)})},t}();e.SortedWith=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.sum=function(){for(var t=0;this.iterator.hasNext();)t+=this.iterator.next();return t},t}();e.Sum=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.sumBy=function(t){for(var e=0;this.iterator.hasNext();){e+=t(this.iterator.next())}return e},t}();e.SumBy=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.take=function(t){return this.withIndex().takeWhile(function(e){return e.index<t}).map(function(t){return t.value})},t}();e.Take=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.iterator=t,this.predicate=e,this.done=!1}return t.prototype.hasNext=function(){return this.processNext(),!this.done},t.prototype.next=function(){this.processNext();var t=this.nextItem;return this.nextItem=void 0,t},t.prototype.processNext=function(){if(!this.done&&void 0===this.nextItem){if(this.iterator.hasNext()){var t=this.iterator.next();if(this.predicate(t))return void(this.nextItem=t)}this.done=!0}},t}(),i=function(){function t(){}return t.prototype.takeWhile=function(t){return r.createSequence(new o(this.iterator,t))},t}();e.TakeWhile=i},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.toArray=function(t){for(var e=t||[];this.iterator.hasNext();)e.push(this.iterator.next());return e},t.prototype.toList=function(t){return this.toArray(t)},t}();e.ToArray=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.toMap=function(t){for(var e=t||new Map;this.iterator.hasNext();){var n=this.iterator.next(),r=n[0],o=n[1];e.set(r,o)}return e},t}();e.ToMap=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.toSet=function(t){for(var e=t||new Set;this.iterator.hasNext();){var n=this.iterator.next();e.add(n)}return e},t}();e.ToSet=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.unzip=function(){for(var t=[],e=[];this.iterator.hasNext();){var n=this.iterator.next(),r=n[0],o=n[1];t.push(r),e.push(o)}return[t,e]},t}();e.Unzip=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t){this.iterator=t,this.index=-1}return t.prototype.hasNext=function(){return this.iterator.hasNext()},t.prototype.next=function(){var t=this.iterator.next();return this.index++,{index:this.index,value:t}},t}(),i=function(){function t(){}return t.prototype.withIndex=function(){return r.createSequence(new o(this.iterator))},t}();e.WithIndex=i},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e){this.iterator1=t,this.iterator2=e}return t.prototype.hasNext=function(){return this.iterator1.hasNext()&&this.iterator2.hasNext()},t.prototype.next=function(){return[this.iterator1.next(),this.iterator2.next()]},t}(),i=function(){function t(){}return t.prototype.zip=function(t){return r.createSequence(new o(this.iterator,t.iterator))},t}();e.Zip=i}])});
//# sourceMappingURL=sequency.min.js.map

@@ -97,2 +97,2 @@ import SequenceIterator from "./SequenceIterator";

export declare function generateSequence<T>(seed: T | null | undefined, nextFunction: (item: T) => T | null | undefined): Sequence<T>;
export declare function range(startInclusive: number, endExclusive: number, step?: number): Sequence<number>;
export declare function range(start: number, endInclusive: number, step?: number): Sequence<number>;

@@ -138,14 +138,14 @@ Object.defineProperty(exports, "__esModule", { value: true });

exports.generateSequence = generateSequence;
function range(startInclusive, endExclusive, step) {
function range(start, endInclusive, step) {
if (step === void 0) { step = 1; }
if (startInclusive >= endExclusive) {
throw new Error("startInclusive [" + startInclusive + "] must be lower then endExclusive [" + endExclusive + "]");
if (start > endInclusive) {
throw new Error("start [" + start + "] must be lower then endInclusive [" + endInclusive + "]");
}
if (startInclusive === endExclusive - 1) {
if (start === endInclusive) {
return emptySequence();
}
var current = startInclusive;
var current = start;
return generateSequence(function () {
try {
return current < endExclusive
return current <= endInclusive
? current

@@ -152,0 +152,0 @@ : undefined;

{
"name": "sequency",
"version": "0.16.0",
"version": "0.17.0",
"description": "Functional sequences for processing iterable data in JavaScript",

@@ -66,3 +66,3 @@ "main": "lib/Sequence.js",

"path": "lib-umd/sequency.min.js",
"limit": "5 KB"
"limit": "9 KB"
}

@@ -69,0 +69,0 @@ ],

@@ -17,3 +17,3 @@ # ![Sequencey](/sequency.png) [![Travic CI](https://travis-ci.org/winterbe/sequency.svg?branch=master)](https://travis-ci.org/winterbe/sequency)

Sequency is a lightweight (**3 KB minified**), intensely tested (**200+ tests, 99% coverage**), type-safe functional programming library for processing iterable data such as arrays, sets and maps. It's written in TypeScript, compiles to ES5-compatible JavaScript and works in all current browsers and Node applications. The API is inspired by [Sequences](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/) from the programming language [Kotlin](https://kotlinlang.org/).
Sequency is a lightweight (**5 KB minified**), intensely tested (**200+ tests, 99% coverage**), type-safe functional programming library for processing iterable data such as arrays, sets and maps. It's written in TypeScript, compiles to ES5-compatible JavaScript and works in all current browsers and Node applications. The API is inspired by [Sequences](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/) from the programming language [Kotlin](https://kotlinlang.org/).

@@ -20,0 +20,0 @@ > Not convinced? [Try Sequency](https://npm.runkit.com/sequency) right in your browser.

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

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

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