iterable-linq-utility 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { type ILinqIterable } from "./linqIterable";
1
+ import { LinqIterableWrapper, type ILinqIterable } from "./linqIterable";
2
2
  export declare function from<T>(iterable: Iterable<T>): ILinqIterable<T>;
3
- export { ILinqIterable };
3
+ export { ILinqIterable, LinqIterableWrapper };
@@ -1,44 +1,47 @@
1
- var I = Object.defineProperty;
2
- var p = (e, t, r) => t in e ? I(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var i = (e, t, r) => (p(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- function z(e, t) {
5
- return (r, s) => t(e(r, s), s);
1
+ var w = Object.defineProperty;
2
+ var b = (e, t, r) => t in e ? w(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var n = (e, t, r) => (b(e, typeof t != "symbol" ? t + "" : t, r), r);
4
+ function y(e, t) {
5
+ return (r, i) => t(e(r, i), i);
6
6
  }
7
- function x(e, t) {
8
- return (r, s) => e(r, s) && t(r, s);
7
+ function p(e, t) {
8
+ return (r, i) => e(r, i) && t(r, i);
9
9
  }
10
- function m(e, t) {
10
+ function z(e, t) {
11
11
  return {
12
12
  done: e,
13
13
  value: t
14
14
  };
15
15
  }
16
- function f() {
16
+ function S() {
17
17
  return { done: !0, value: void 0 };
18
18
  }
19
- function w(e, t) {
20
- return new c(e, t);
19
+ function k(e) {
20
+ return typeof e == "function";
21
21
  }
22
- class c {
22
+ function M(e, t) {
23
+ return new f(e, t);
24
+ }
25
+ class f {
23
26
  constructor(t, r) {
24
- i(this, "predicate");
25
- i(this, "source");
26
- let s = r, n = t;
27
- if (n instanceof c) {
28
- const u = n.predicate;
29
- n = n.source, s = x(u, s);
27
+ n(this, "predicate");
28
+ n(this, "source");
29
+ let i = r, s = t;
30
+ if (s instanceof f) {
31
+ const u = s.predicate;
32
+ s = s.source, i = p(u, i);
30
33
  }
31
- this.source = n, this.predicate = s;
34
+ this.source = s, this.predicate = i;
32
35
  }
33
36
  [Symbol.iterator]() {
34
- return new S(this.source, this.predicate);
37
+ return new L(this.source, this.predicate);
35
38
  }
36
39
  }
37
- class S {
40
+ class L {
38
41
  constructor(t, r) {
39
- i(this, "index", 0);
40
- i(this, "sourceIterator");
41
- i(this, "predicate");
42
+ n(this, "index", 0);
43
+ n(this, "sourceIterator");
44
+ n(this, "predicate");
42
45
  this.sourceIterator = t[Symbol.iterator](), this.predicate = r;
43
46
  }
44
47
  next() {
@@ -49,60 +52,60 @@ class S {
49
52
  }
50
53
  }
51
54
  }
52
- function b(e, t) {
53
- return new l(e, t);
55
+ function v(e, t) {
56
+ return new m(e, t);
54
57
  }
55
- class l {
58
+ class m {
56
59
  constructor(t, r) {
57
- i(this, "mapper");
58
- i(this, "source");
59
- let s = r, n = t;
60
- if (n instanceof l) {
61
- const u = n.mapper;
62
- n = n.source, s = z(u, s);
60
+ n(this, "mapper");
61
+ n(this, "source");
62
+ let i = r, s = t;
63
+ if (s instanceof m) {
64
+ const u = s.mapper;
65
+ s = s.source, i = y(u, i);
63
66
  }
64
- this.source = t, this.mapper = s;
67
+ this.source = t, this.mapper = i;
65
68
  }
66
69
  [Symbol.iterator]() {
67
- return new M(this.source, this.mapper);
70
+ return new N(this.source, this.mapper);
68
71
  }
69
72
  }
70
- class M {
73
+ class N {
71
74
  constructor(t, r) {
72
- i(this, "index", 0);
73
- i(this, "sourceIterator");
74
- i(this, "mapper");
75
+ n(this, "index", 0);
76
+ n(this, "sourceIterator");
77
+ n(this, "mapper");
75
78
  this.sourceIterator = t[Symbol.iterator](), this.mapper = r;
76
79
  }
77
80
  next() {
78
81
  const t = this.sourceIterator.next();
79
- return t.done !== !0 ? m(!1, this.mapper(t.value, this.index++)) : f();
82
+ return t.done !== !0 ? z(!1, this.mapper(t.value, this.index++)) : S();
80
83
  }
81
84
  }
82
- function y(e) {
83
- const t = e[Symbol.iterator](), r = new a();
84
- for (let s = t.next(); s.done !== !0; s = t.next())
85
- r.addLast(s.value);
85
+ function A(e) {
86
+ const t = e[Symbol.iterator](), r = new h();
87
+ for (let i = t.next(); i.done !== !0; i = t.next())
88
+ r.addLast(i.value);
86
89
  return r;
87
90
  }
88
- class k {
91
+ class F {
89
92
  constructor(t = null) {
90
- i(this, "current", null);
93
+ n(this, "current", null);
91
94
  this.current = t;
92
95
  }
93
96
  next() {
94
97
  const t = this.current;
95
- return t === null ? f() : (this.current = t.nextNode, m(!1, t.data));
98
+ return t === null ? S() : (this.current = t.nextNode, z(!1, t.data));
96
99
  }
97
100
  }
98
- class a {
101
+ class h {
99
102
  constructor() {
100
- i(this, "internalSize", 0);
101
- i(this, "head", null);
102
- i(this, "tail", null);
103
+ n(this, "internalSize", 0);
104
+ n(this, "head", null);
105
+ n(this, "tail", null);
103
106
  }
104
107
  [Symbol.iterator]() {
105
- return new k(this.head);
108
+ return new F(this.head);
106
109
  }
107
110
  addFirst(t) {
108
111
  const r = {
@@ -136,54 +139,54 @@ class a {
136
139
  return this.internalSize;
137
140
  }
138
141
  }
139
- function L(e) {
140
- return e instanceof h ? e : new h(e);
142
+ function g(e) {
143
+ return e instanceof I ? e : new I(e);
141
144
  }
142
- class h {
145
+ class I {
143
146
  constructor(t) {
144
- i(this, "source");
145
- if (t instanceof a) {
147
+ n(this, "source");
148
+ if (t instanceof h) {
146
149
  this.source = t;
147
150
  return;
148
151
  }
149
- this.source = y(t);
152
+ this.source = A(t);
150
153
  }
151
154
  [Symbol.iterator]() {
152
- return new N(this.source);
155
+ return new P(this.source);
153
156
  }
154
157
  }
155
- class N {
158
+ class P {
156
159
  constructor(t) {
157
- i(this, "sourceIterator");
160
+ n(this, "sourceIterator");
158
161
  this.sourceIterator = t[Symbol.iterator]();
159
162
  }
160
163
  next() {
161
164
  return this.sourceIterator.next();
162
165
  }
163
166
  }
164
- function v(e) {
165
- return e instanceof d ? e : new d(e);
167
+ function R(e) {
168
+ return e instanceof x ? e : new x(e);
166
169
  }
167
- class d {
170
+ class x {
168
171
  constructor(t) {
169
- i(this, "isMemoized", !1);
170
- i(this, "sourceIterator");
171
- i(this, "linkedList", new a());
172
- i(this, "source");
173
- this.source = t, this.sourceIterator = t[Symbol.iterator](), t instanceof a && (this.linkedList = t, this.isMemoized = !0);
172
+ n(this, "isMemoized", !1);
173
+ n(this, "sourceIterator");
174
+ n(this, "linkedList", new h());
175
+ n(this, "source");
176
+ this.source = t, this.sourceIterator = t[Symbol.iterator](), t instanceof h && (this.linkedList = t, this.isMemoized = !0);
174
177
  }
175
178
  [Symbol.iterator]() {
176
- return this.isMemoized ? new g(this.linkedList) : new A(this.sourceIterator, this.linkedList, (t) => this.isMemoized = t.done === !0);
179
+ return this.isMemoized ? new T(this.linkedList) : new D(this.sourceIterator, this.linkedList, (t) => this.isMemoized = t.done === !0);
177
180
  }
178
181
  }
179
- class A {
180
- constructor(t, r, s) {
181
- i(this, "index", 0);
182
- i(this, "linkedList");
183
- i(this, "linkedListIterator");
184
- i(this, "setAsMemoized");
185
- i(this, "sourceIterator");
186
- this.linkedList = r, this.linkedListIterator = r[Symbol.iterator](), this.setAsMemoized = s, this.sourceIterator = t;
182
+ class D {
183
+ constructor(t, r, i) {
184
+ n(this, "index", 0);
185
+ n(this, "linkedList");
186
+ n(this, "linkedListIterator");
187
+ n(this, "setAsMemoized");
188
+ n(this, "sourceIterator");
189
+ this.linkedList = r, this.linkedListIterator = r[Symbol.iterator](), this.setAsMemoized = i, this.sourceIterator = t;
187
190
  }
188
191
  next() {
189
192
  if (this.linkedList.size() > this.index++)
@@ -192,26 +195,41 @@ class A {
192
195
  return this.setAsMemoized(t) || this.linkedList.addLast(t.value), t;
193
196
  }
194
197
  }
195
- class g {
198
+ class T {
196
199
  constructor(t) {
197
- i(this, "memoizedSourceIterator");
200
+ n(this, "memoizedSourceIterator");
198
201
  this.memoizedSourceIterator = t[Symbol.iterator]();
199
202
  }
200
203
  next() {
201
204
  return this.memoizedSourceIterator.next();
202
205
  }
203
206
  }
204
- function F(e, t) {
207
+ function $(e, t) {
208
+ const r = e[Symbol.iterator]();
209
+ let i = r.next(), s = i.value, u = null;
210
+ for (t == null ? u = (o, a) => o < a ? -1 : o === a ? 0 : 1 : k(t) ? u = t : Array.isArray(t) ? u = (o, a) => {
211
+ let d = 0;
212
+ for (const l of t)
213
+ if (d = o[l] < a[l] ? -1 : o[l] === a[l] ? 0 : 1, d !== 0)
214
+ break;
215
+ return d;
216
+ } : u = (o, a) => o[t] < a[t] ? -1 : o[t] === a[t] ? 0 : 1, i = r.next(); i.done !== !0; i = r.next()) {
217
+ const o = u(s, i.value);
218
+ s = o < 0 || o === 0 ? s : i.value;
219
+ }
220
+ return s == null ? null : s;
221
+ }
222
+ function j(e, t) {
205
223
  const r = e[Symbol.iterator]();
206
- let s = 0;
207
- for (let n = r.next(); n.done !== !0; n = r.next())
208
- if (t(n.value, s++))
224
+ let i = 0;
225
+ for (let s = r.next(); s.done !== !0; s = r.next())
226
+ if (t(s.value, i++))
209
227
  return !0;
210
228
  return !1;
211
229
  }
212
- class o {
230
+ class c {
213
231
  constructor(t) {
214
- i(this, "iterable");
232
+ n(this, "iterable");
215
233
  this.iterable = t;
216
234
  }
217
235
  [Symbol.iterator]() {
@@ -221,24 +239,28 @@ class o {
221
239
  return [...this.iterable];
222
240
  }
223
241
  filter(t) {
224
- return new o(w(this.iterable, t));
242
+ return new c(M(this.iterable, t));
225
243
  }
226
244
  map(t) {
227
- return new o(b(this.iterable, t));
245
+ return new c(v(this.iterable, t));
228
246
  }
229
247
  materialize() {
230
- return new o(L(this.iterable));
248
+ return new c(g(this.iterable));
231
249
  }
232
250
  memoize() {
233
- return new o(v(this.iterable));
251
+ return new c(R(this.iterable));
252
+ }
253
+ min(t) {
254
+ return $(this.iterable, t);
234
255
  }
235
256
  some(t) {
236
- return F(this.iterable, t);
257
+ return j(this.iterable, t);
237
258
  }
238
259
  }
239
- function R(e) {
240
- return new o(e);
260
+ function C(e) {
261
+ return new c(e);
241
262
  }
242
263
  export {
243
- R as from
264
+ c as LinqIterableWrapper,
265
+ C as from
244
266
  };
@@ -1 +1 @@
1
- (function(a,o){typeof exports=="object"&&typeof module<"u"?o(exports):typeof define=="function"&&define.amd?define(["exports"],o):(a=typeof globalThis<"u"?globalThis:a||self,o(a["interable-linq-utility"]={}))})(this,function(a){"use strict";var T=Object.defineProperty;var F=(a,o,u)=>o in a?T(a,o,{enumerable:!0,configurable:!0,writable:!0,value:u}):a[o]=u;var i=(a,o,u)=>(F(a,typeof o!="symbol"?o+"":o,u),u);function o(e,t){return(r,n)=>t(e(r,n),n)}function u(e,t){return(r,n)=>e(r,n)&&t(r,n)}function f(e,t){return{done:e,value:t}}function p(){return{done:!0,value:void 0}}function R(e){return e}function x(e,t){return new d(e,t)}class d{constructor(t,r){i(this,"predicate");i(this,"source");let n=r,s=t;if(s instanceof d){const m=s.predicate;s=s.source,n=u(m,n)}this.source=s,this.predicate=n}[Symbol.iterator](){return new S(this.source,this.predicate)}}class S{constructor(t,r){i(this,"index",0);i(this,"sourceIterator");i(this,"predicate");this.sourceIterator=t[Symbol.iterator](),this.predicate=r}next(){for(;;){const t=this.sourceIterator.next();if(t.done===!0||this.predicate(t.value,this.index++))return t}}}function b(e,t){return new h(e,t)}class h{constructor(t,r){i(this,"mapper");i(this,"source");let n=r,s=t;if(s instanceof h){const m=s.mapper;s=s.source,n=o(m,n)}this.source=t,this.mapper=n}[Symbol.iterator](){return new w(this.source,this.mapper)}}class w{constructor(t,r){i(this,"index",0);i(this,"sourceIterator");i(this,"mapper");this.sourceIterator=t[Symbol.iterator](),this.mapper=r}next(){const t=this.sourceIterator.next();return t.done!==!0?f(!1,this.mapper(t.value,this.index++)):p()}}function y(e){const t=e[Symbol.iterator](),r=new l;for(let n=t.next();n.done!==!0;n=t.next())r.addLast(n.value);return r}class M{constructor(t=null){i(this,"current",null);this.current=t}next(){const t=this.current;return t===null?p():(this.current=t.nextNode,f(!1,t.data))}}class l{constructor(){i(this,"internalSize",0);i(this,"head",null);i(this,"tail",null)}[Symbol.iterator](){return new M(this.head)}addFirst(t){const r={data:t,nextNode:null};switch(this.internalSize){case 0:this.head=r,this.tail=r;break;default:r.nextNode=this.head,this.head=r}return this.internalSize++,this}addLast(t){const r={data:t,nextNode:null};switch(this.internalSize){case 0:this.head=r,this.tail=r;break;default:this.tail.nextNode=r,this.tail=r}return this.internalSize++,this}size(){return this.internalSize}}function k(e){return e instanceof I?e:new I(e)}class I{constructor(t){i(this,"source");if(t instanceof l){this.source=t;return}this.source=y(t)}[Symbol.iterator](){return new L(this.source)}}class L{constructor(t){i(this,"sourceIterator");this.sourceIterator=t[Symbol.iterator]()}next(){return this.sourceIterator.next()}}function v(e){return e instanceof z?e:new z(e)}class z{constructor(t){i(this,"isMemoized",!1);i(this,"sourceIterator");i(this,"linkedList",new l);i(this,"source");this.source=t,this.sourceIterator=t[Symbol.iterator](),t instanceof l&&(this.linkedList=t,this.isMemoized=!0)}[Symbol.iterator](){return this.isMemoized?new g(this.linkedList):new N(this.sourceIterator,this.linkedList,t=>this.isMemoized=t.done===!0)}}class N{constructor(t,r,n){i(this,"index",0);i(this,"linkedList");i(this,"linkedListIterator");i(this,"setAsMemoized");i(this,"sourceIterator");this.linkedList=r,this.linkedListIterator=r[Symbol.iterator](),this.setAsMemoized=n,this.sourceIterator=t}next(){if(this.linkedList.size()>this.index++)return this.linkedListIterator.next();const t=this.sourceIterator.next();return this.setAsMemoized(t)||this.linkedList.addLast(t.value),t}}class g{constructor(t){i(this,"memoizedSourceIterator");this.memoizedSourceIterator=t[Symbol.iterator]()}next(){return this.memoizedSourceIterator.next()}}function A(e,t){const r=e[Symbol.iterator]();let n=0;for(let s=r.next();s.done!==!0;s=r.next())if(t(s.value,n++))return!0;return!1}class c{constructor(t){i(this,"iterable");this.iterable=t}[Symbol.iterator](){return this.iterable[Symbol.iterator]()}collectToArray(){return[...this.iterable]}filter(t){return new c(x(this.iterable,t))}map(t){return new c(b(this.iterable,t))}materialize(){return new c(k(this.iterable))}memoize(){return new c(v(this.iterable))}some(t){return A(this.iterable,t)}}function P(e){return new c(e)}a.from=P,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(o,u){typeof exports=="object"&&typeof module<"u"?u(exports):typeof define=="function"&&define.amd?define(["exports"],u):(o=typeof globalThis<"u"?globalThis:o||self,u(o["interable-linq-utility"]={}))})(this,function(o){"use strict";var $=Object.defineProperty;var B=(o,u,d)=>u in o?$(o,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):o[u]=d;var n=(o,u,d)=>(B(o,typeof u!="symbol"?u+"":u,d),d);function u(e,t){return(r,i)=>t(e(r,i),i)}function d(e,t){return(r,i)=>e(r,i)&&t(r,i)}function S(e,t){return{done:e,value:t}}function b(){return{done:!0,value:void 0}}function C(e){return e}function w(e){return typeof e=="function"}function M(e,t){return new I(e,t)}class I{constructor(t,r){n(this,"predicate");n(this,"source");let i=r,s=t;if(s instanceof I){const l=s.predicate;s=s.source,i=d(l,i)}this.source=s,this.predicate=i}[Symbol.iterator](){return new k(this.source,this.predicate)}}class k{constructor(t,r){n(this,"index",0);n(this,"sourceIterator");n(this,"predicate");this.sourceIterator=t[Symbol.iterator](),this.predicate=r}next(){for(;;){const t=this.sourceIterator.next();if(t.done===!0||this.predicate(t.value,this.index++))return t}}}function L(e,t){return new x(e,t)}class x{constructor(t,r){n(this,"mapper");n(this,"source");let i=r,s=t;if(s instanceof x){const l=s.mapper;s=s.source,i=u(l,i)}this.source=t,this.mapper=i}[Symbol.iterator](){return new v(this.source,this.mapper)}}class v{constructor(t,r){n(this,"index",0);n(this,"sourceIterator");n(this,"mapper");this.sourceIterator=t[Symbol.iterator](),this.mapper=r}next(){const t=this.sourceIterator.next();return t.done!==!0?S(!1,this.mapper(t.value,this.index++)):b()}}function N(e){const t=e[Symbol.iterator](),r=new f;for(let i=t.next();i.done!==!0;i=t.next())r.addLast(i.value);return r}class A{constructor(t=null){n(this,"current",null);this.current=t}next(){const t=this.current;return t===null?b():(this.current=t.nextNode,S(!1,t.data))}}class f{constructor(){n(this,"internalSize",0);n(this,"head",null);n(this,"tail",null)}[Symbol.iterator](){return new A(this.head)}addFirst(t){const r={data:t,nextNode:null};switch(this.internalSize){case 0:this.head=r,this.tail=r;break;default:r.nextNode=this.head,this.head=r}return this.internalSize++,this}addLast(t){const r={data:t,nextNode:null};switch(this.internalSize){case 0:this.head=r,this.tail=r;break;default:this.tail.nextNode=r,this.tail=r}return this.internalSize++,this}size(){return this.internalSize}}function g(e){return e instanceof p?e:new p(e)}class p{constructor(t){n(this,"source");if(t instanceof f){this.source=t;return}this.source=N(t)}[Symbol.iterator](){return new F(this.source)}}class F{constructor(t){n(this,"sourceIterator");this.sourceIterator=t[Symbol.iterator]()}next(){return this.sourceIterator.next()}}function P(e){return e instanceof y?e:new y(e)}class y{constructor(t){n(this,"isMemoized",!1);n(this,"sourceIterator");n(this,"linkedList",new f);n(this,"source");this.source=t,this.sourceIterator=t[Symbol.iterator](),t instanceof f&&(this.linkedList=t,this.isMemoized=!0)}[Symbol.iterator](){return this.isMemoized?new R(this.linkedList):new T(this.sourceIterator,this.linkedList,t=>this.isMemoized=t.done===!0)}}class T{constructor(t,r,i){n(this,"index",0);n(this,"linkedList");n(this,"linkedListIterator");n(this,"setAsMemoized");n(this,"sourceIterator");this.linkedList=r,this.linkedListIterator=r[Symbol.iterator](),this.setAsMemoized=i,this.sourceIterator=t}next(){if(this.linkedList.size()>this.index++)return this.linkedListIterator.next();const t=this.sourceIterator.next();return this.setAsMemoized(t)||this.linkedList.addLast(t.value),t}}class R{constructor(t){n(this,"memoizedSourceIterator");this.memoizedSourceIterator=t[Symbol.iterator]()}next(){return this.memoizedSourceIterator.next()}}function j(e,t){const r=e[Symbol.iterator]();let i=r.next(),s=i.value,l=null;for(t==null?l=(a,c)=>a<c?-1:a===c?0:1:w(t)?l=t:Array.isArray(t)?l=(a,c)=>{let z=0;for(const m of t)if(z=a[m]<c[m]?-1:a[m]===c[m]?0:1,z!==0)break;return z}:l=(a,c)=>a[t]<c[t]?-1:a[t]===c[t]?0:1,i=r.next();i.done!==!0;i=r.next()){const a=l(s,i.value);s=a<0||a===0?s:i.value}return s==null?null:s}function D(e,t){const r=e[Symbol.iterator]();let i=0;for(let s=r.next();s.done!==!0;s=r.next())if(t(s.value,i++))return!0;return!1}class h{constructor(t){n(this,"iterable");this.iterable=t}[Symbol.iterator](){return this.iterable[Symbol.iterator]()}collectToArray(){return[...this.iterable]}filter(t){return new h(M(this.iterable,t))}map(t){return new h(L(this.iterable,t))}materialize(){return new h(g(this.iterable))}memoize(){return new h(P(this.iterable))}min(t){return j(this.iterable,t)}some(t){return D(this.iterable,t)}}function O(e){return new h(e)}o.LinqIterableWrapper=h,o.from=O,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,4 +1,4 @@
1
- import { Mapper, Predicate } from '@/types';
1
+ import { Comparer, Mapper, Predicate } from '@/types';
2
2
  export interface ILinqIterable<T> {
3
3
  [Symbol.iterator](): Iterator<T, any, undefined>;
4
4
  collectToArray(): T[];
@@ -6,9 +6,10 @@ export interface ILinqIterable<T> {
6
6
  map<R>(mapper: Mapper<T, R>): ILinqIterable<R>;
7
7
  materialize(): ILinqIterable<T>;
8
8
  memoize(): ILinqIterable<T>;
9
+ min(comparer?: Comparer<T>): T | null | undefined;
9
10
  some(predicate: Predicate<T>): boolean;
10
11
  }
11
- export declare class LinqIterable<T> implements ILinqIterable<T> {
12
+ export declare class LinqIterableWrapper<T> implements ILinqIterable<T> {
12
13
  constructor(iterable: Iterable<T>);
13
14
  [Symbol.iterator](): Iterator<T, any, undefined>;
14
15
  private iterable;
@@ -17,5 +18,6 @@ export declare class LinqIterable<T> implements ILinqIterable<T> {
17
18
  map<R>(mapper: Mapper<T, R>): ILinqIterable<R>;
18
19
  materialize(): ILinqIterable<T>;
19
20
  memoize(): ILinqIterable<T>;
21
+ min(comparer?: Comparer<T>): T | null | undefined;
20
22
  some(predicate: Predicate<T>): boolean;
21
23
  }
@@ -1,4 +1,4 @@
1
- declare type ComparerFunction<T> = (a: T, b: T, index: number) => number;
1
+ declare type ComparerFunction<T> = (a: T, b: T) => number;
2
2
  declare type ComparingProps<T> = keyof T | Array<keyof T>;
3
3
  export declare type Comparer<T> = ComparerFunction<T> | ComparingProps<T>;
4
4
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iterable-linq-utility",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "An Iterable mutation utility inspired by .net Linq and Javascript Array interface",
5
5
  "type": "module",
6
6
  "main": "./dist/interable-linq-utility.umd.cjs",
@@ -20,7 +20,7 @@
20
20
  "dev": "vite",
21
21
  "lint": "eslint . --ext .js,.jsx,.ts,.tsx --ignore-path .eslintignore",
22
22
  "lint-fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix --ignore-path .eslintignore",
23
- "test": "vitest",
23
+ "test": "vitest run",
24
24
  "test:coverage": "vitest run --coverage",
25
25
  "test:ui": "vitest --ui"
26
26
  },