iterable-linq-utility 0.0.16 → 0.2.0

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.
Files changed (40) hide show
  1. package/README.md +72 -0
  2. package/dist/index.d.cts +875 -0
  3. package/dist/index.d.ts +875 -14
  4. package/dist/iterable-linq-utility.js +641 -0
  5. package/dist/iterable-linq-utility.umd.cjs +1 -0
  6. package/package.json +42 -24
  7. package/dist/collections/index.d.ts +0 -2
  8. package/dist/collections/linkedList.d.ts +0 -24
  9. package/dist/functions/collectToArray.d.ts +0 -1
  10. package/dist/functions/empty.d.ts +0 -1
  11. package/dist/functions/filter.d.ts +0 -9
  12. package/dist/functions/flatMap.d.ts +0 -8
  13. package/dist/functions/forEach.d.ts +0 -3
  14. package/dist/functions/index.d.ts +0 -23
  15. package/dist/functions/map.d.ts +0 -9
  16. package/dist/functions/materialize.d.ts +0 -7
  17. package/dist/functions/max.d.ts +0 -9
  18. package/dist/functions/memoize.d.ts +0 -11
  19. package/dist/functions/min.d.ts +0 -9
  20. package/dist/functions/range.d.ts +0 -7
  21. package/dist/functions/reduce.d.ts +0 -10
  22. package/dist/functions/repeat.d.ts +0 -1
  23. package/dist/functions/some.d.ts +0 -9
  24. package/dist/functions/tap.d.ts +0 -9
  25. package/dist/functions/tapChain.d.ts +0 -9
  26. package/dist/interable-linq-utility.js +0 -708
  27. package/dist/interable-linq-utility.umd.cjs +0 -1
  28. package/dist/linqIterable.d.ts +0 -45
  29. package/dist/types/action.d.ts +0 -3
  30. package/dist/types/comparer.d.ts +0 -4
  31. package/dist/types/index.d.ts +0 -7
  32. package/dist/types/mapper.d.ts +0 -1
  33. package/dist/types/predicate.d.ts +0 -1
  34. package/dist/types/reducer.d.ts +0 -1
  35. package/dist/types/tapper.d.ts +0 -2
  36. package/dist/types/unit.d.ts +0 -3
  37. package/dist/utils/index.d.ts +0 -4
  38. package/dist/utils/iteratorResults.d.ts +0 -4
  39. package/dist/utils/utils.d.ts +0 -56
  40. package/dist/utils/validations.d.ts +0 -5
@@ -1,708 +0,0 @@
1
- var G = Object.defineProperty;
2
- var H = (e, t, r) => t in e ? G(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var n = (e, t, r) => (H(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- function m(e) {
5
- return { done: !1, value: e };
6
- }
7
- function s(e) {
8
- return { done: !0, value: e };
9
- }
10
- function h(e) {
11
- return typeof e == "function";
12
- }
13
- function I(e) {
14
- if (e == null)
15
- throw new Error('The "sourceIterable" must be provided');
16
- if (!h(e[Symbol.iterator]))
17
- throw new Error('The provided "soureIterable" does not conform to the iterator protocol https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol. It must implement the "[Symbol.iterator]" function.');
18
- }
19
- function K(e) {
20
- if (!h(e))
21
- throw new Error('The "predicate" function must be provided');
22
- }
23
- function Q(e) {
24
- if (!h(e))
25
- throw new Error('The "mapper" function must be provided');
26
- }
27
- function X(e) {
28
- return I(e), Array.from(e);
29
- }
30
- function z() {
31
- return new Y();
32
- }
33
- class Y {
34
- [Symbol.iterator]() {
35
- return new Z();
36
- }
37
- }
38
- class Z {
39
- next() {
40
- return s();
41
- }
42
- return(t) {
43
- return s(t);
44
- }
45
- throw() {
46
- return s();
47
- }
48
- }
49
- function M(e, t) {
50
- return I(e), K(t), new _(e, t);
51
- }
52
- class _ {
53
- constructor(t, r) {
54
- n(this, "predicate");
55
- n(this, "source");
56
- this.source = t, this.predicate = r;
57
- }
58
- [Symbol.iterator]() {
59
- return new q(this.source, this.predicate);
60
- }
61
- }
62
- class q {
63
- constructor(t, r) {
64
- n(this, "index", 0);
65
- n(this, "sourceIterator");
66
- n(this, "predicate");
67
- n(this, "internalNext", () => {
68
- for (; ; ) {
69
- const t = this.sourceIterator.next();
70
- if (t.done === !0 || this.predicate(t.value, this.index++))
71
- return t;
72
- }
73
- });
74
- this.sourceIterator = t[Symbol.iterator](), this.predicate = r;
75
- }
76
- next() {
77
- return this.internalNext();
78
- }
79
- return(t) {
80
- return this.internalNext = s, s(t);
81
- }
82
- }
83
- function g(e, t) {
84
- return I(e), Q(t), new W(e, t);
85
- }
86
- class W {
87
- constructor(t, r) {
88
- n(this, "mapper");
89
- n(this, "source");
90
- this.source = t, this.mapper = r;
91
- }
92
- [Symbol.iterator]() {
93
- return new tt(this.source, this.mapper);
94
- }
95
- }
96
- class tt {
97
- constructor(t, r) {
98
- n(this, "index", 0);
99
- n(this, "mapper");
100
- n(this, "sourceIterator");
101
- n(this, "fmIterator");
102
- n(this, "sourceNext", () => {
103
- const t = this.sourceIterator.next();
104
- if (t.done !== !0) {
105
- const r = this.mapper(t.value, this.index++);
106
- return this.fmIterator = r[Symbol.iterator](), this.internalNext = this.fmNext, this.internalNext();
107
- }
108
- return this.internalNext = s, this.internalNext();
109
- });
110
- n(this, "fmNext", () => {
111
- const t = this.fmIterator.next();
112
- return t.done !== !0 ? m(t.value) : (this.internalNext = this.sourceNext, this.internalNext());
113
- });
114
- n(this, "internalNext", this.sourceNext);
115
- this.sourceIterator = t[Symbol.iterator](), this.mapper = r;
116
- }
117
- next() {
118
- return this.internalNext();
119
- }
120
- return(t) {
121
- return this.internalNext = s, s(t);
122
- }
123
- }
124
- class et {
125
- }
126
- const A = new et();
127
- Object.freeze(A);
128
- function w() {
129
- return A;
130
- }
131
- function k(e, t) {
132
- if (e == null)
133
- throw 'The source "iterable" must be provided';
134
- if (!h(t))
135
- throw '"action" function must be provided';
136
- const r = e[Symbol.iterator]();
137
- for (let i = r.next(), o = 0; i.done !== !0; i = r.next(), o++)
138
- t(i.value, o);
139
- return w();
140
- }
141
- async function T(e, t) {
142
- if (e == null)
143
- throw 'The source "iterable" must be provided';
144
- if (!h(t))
145
- throw '"action" function must be provided';
146
- const r = [], i = e[Symbol.iterator]();
147
- for (let o = i.next(), a = 0; o.done !== !0; o = i.next(), a++)
148
- r.push(t(o.value, a));
149
- return await Promise.all(r), w();
150
- }
151
- function L(e, t) {
152
- if (e == null)
153
- throw 'The source "iterable" must be provided';
154
- if (!h(t))
155
- throw '"mapper" function must be provided';
156
- return new rt(e, t);
157
- }
158
- class rt {
159
- constructor(t, r) {
160
- n(this, "mapper");
161
- n(this, "source");
162
- this.source = t, this.mapper = r;
163
- }
164
- [Symbol.iterator]() {
165
- return new nt(this.source, this.mapper);
166
- }
167
- }
168
- class nt {
169
- constructor(t, r) {
170
- n(this, "index", 0);
171
- n(this, "sourceIterator");
172
- n(this, "mapper");
173
- n(this, "internalNext", () => {
174
- const t = this.sourceIterator.next();
175
- return t.done !== !0 ? m(this.mapper(t.value, this.index++)) : (this.internalNext = s, this.internalNext());
176
- });
177
- this.sourceIterator = t[Symbol.iterator](), this.mapper = r;
178
- }
179
- next() {
180
- return this.internalNext();
181
- }
182
- return(t) {
183
- return this.internalNext = s, h(this.sourceIterator.return) && this.sourceIterator.return(t), s(t);
184
- }
185
- }
186
- function R(e) {
187
- if (e == null)
188
- throw 'The source "iterable" must be provided';
189
- const t = e[Symbol.iterator](), r = new v();
190
- for (let i = t.next(); i.done !== !0; i = t.next())
191
- r.addLast(i.value);
192
- return r;
193
- }
194
- class v {
195
- constructor() {
196
- n(this, "internalSize", 0);
197
- n(this, "head", null);
198
- n(this, "tail", null);
199
- n(this, "internalAddFirst", (t) => {
200
- const r = {
201
- data: t,
202
- nextNode: null
203
- };
204
- return this.head = r, this.tail = r, this.internalSize++, this.internalAddFirst = (i) => {
205
- const o = {
206
- data: i,
207
- nextNode: null
208
- };
209
- return o.nextNode = this.head, this.head = o, this.internalSize++, this;
210
- }, this;
211
- });
212
- n(this, "internalAddLast", (t) => {
213
- const r = {
214
- data: t,
215
- nextNode: null
216
- };
217
- return this.head = r, this.tail = r, this.internalSize++, this.internalAddLast = (i) => {
218
- const o = {
219
- data: i,
220
- nextNode: null
221
- };
222
- return this.tail.nextNode = o, this.tail = o, this.internalSize++, this;
223
- }, this;
224
- });
225
- }
226
- [Symbol.iterator]() {
227
- return new it(this.head || null);
228
- }
229
- addFirst(t) {
230
- return this.internalAddFirst(t);
231
- }
232
- addLast(t) {
233
- return this.internalAddLast(t);
234
- }
235
- size() {
236
- return this.internalSize;
237
- }
238
- }
239
- class it {
240
- constructor(t) {
241
- n(this, "current");
242
- n(this, "innerNext", () => {
243
- const t = this.current;
244
- return t === null ? s() : (this.current = t.nextNode, m(t.data));
245
- });
246
- this.current = t;
247
- }
248
- next() {
249
- return this.innerNext();
250
- }
251
- return(t) {
252
- return this.innerNext = s, s(t);
253
- }
254
- }
255
- function E(e) {
256
- if (e == null)
257
- throw 'The source "iterable" must be provided';
258
- return e instanceof S ? e : new S(e);
259
- }
260
- class S {
261
- constructor(t) {
262
- n(this, "source");
263
- this.source = R(t);
264
- }
265
- [Symbol.iterator]() {
266
- return new ot(this.source);
267
- }
268
- }
269
- class ot {
270
- constructor(t) {
271
- n(this, "sourceIterator");
272
- this.sourceIterator = t[Symbol.iterator]();
273
- }
274
- next() {
275
- return this.sourceIterator.next();
276
- }
277
- }
278
- function F(e, t) {
279
- if (e == null)
280
- throw 'The source "iterable" must be provided';
281
- const r = e[Symbol.iterator]();
282
- let i = r.next(), o = i.value, a = null;
283
- for (t == null ? a = (u, l) => u < l ? -1 : u === l ? 0 : 1 : h(t) ? a = t : Array.isArray(t) ? a = (u, l) => {
284
- let d = 0;
285
- for (const c of t)
286
- if (d = u[c] < l[c] ? -1 : u[c] === l[c] ? 0 : 1, d !== 0)
287
- break;
288
- return d;
289
- } : a = (u, l) => u[t] < l[t] ? -1 : u[t] === l[t] ? 0 : 1, i = r.next(); i.done !== !0; i = r.next()) {
290
- const u = a(o, i.value);
291
- o = u > 0 || u === 0 ? o : i.value;
292
- }
293
- return o ?? null;
294
- }
295
- function P() {
296
- return {
297
- allowPartialMemoization: !0
298
- };
299
- }
300
- function V(e, t) {
301
- if (e == null)
302
- throw 'The source "iterable" must be provided';
303
- const i = {
304
- ...P(),
305
- ...t
306
- }.allowPartialMemoization;
307
- return e instanceof p ? i ? e.changePartialMemoizationBehaviour() : e : e instanceof b ? i ? e : e.changePartialMemoizationBehaviour() : i ? new b(e) : new p(e);
308
- }
309
- class p {
310
- constructor(t) {
311
- n(this, "source");
312
- n(this, "isMemoized", !1);
313
- n(this, "memoized", new v());
314
- this.source = t;
315
- }
316
- [Symbol.iterator]() {
317
- return this.isMemoized ? new B(this.memoized) : new st(this.source, (t) => (this.memoized = t, this.isMemoized = !0, w()));
318
- }
319
- changePartialMemoizationBehaviour() {
320
- return new b(this.source);
321
- }
322
- }
323
- class b {
324
- constructor(t) {
325
- n(this, "isMemoized", !1);
326
- n(this, "isMemoizationStarted", !1);
327
- n(this, "sourceIterator");
328
- n(this, "linkedList", new v());
329
- n(this, "source");
330
- this.source = t;
331
- }
332
- [Symbol.iterator]() {
333
- return this.isMemoizationStarted || (this.sourceIterator = this.source[Symbol.iterator](), this.isMemoizationStarted = !0), this.isMemoized ? new B(this.linkedList) : new ut(this.sourceIterator, this.linkedList, (t) => this.isMemoized = t.done === !0);
334
- }
335
- changePartialMemoizationBehaviour() {
336
- return new p(this.source);
337
- }
338
- }
339
- class st {
340
- constructor(t, r) {
341
- n(this, "linkedListIterator");
342
- n(this, "setAsMemoized");
343
- n(this, "sourceIterable");
344
- n(this, "internalNext", () => {
345
- const t = R(this.sourceIterable);
346
- return this.setAsMemoized(t), this.linkedListIterator = t[Symbol.iterator](), this.internalNext = () => this.linkedListIterator.next(), this.internalNext();
347
- });
348
- this.sourceIterable = t, this.setAsMemoized = r;
349
- }
350
- next() {
351
- return this.internalNext();
352
- }
353
- return(t) {
354
- this.internalNext = s;
355
- const r = this.linkedListIterator;
356
- if (r == null)
357
- return s(t);
358
- if (h(r.return)) {
359
- const i = r.return(t);
360
- return this.linkedListIterator = null, i;
361
- }
362
- return s(t);
363
- }
364
- }
365
- class ut {
366
- constructor(t, r, i) {
367
- n(this, "index", 0);
368
- n(this, "linkedList");
369
- n(this, "linkedListIterator");
370
- n(this, "setAsMemoized");
371
- n(this, "sourceIterator");
372
- n(this, "internalNext");
373
- this.linkedList = r, this.linkedListIterator = r[Symbol.iterator](), this.setAsMemoized = i, this.sourceIterator = t, this.internalNext = () => {
374
- if (this.linkedList.size() > this.index++)
375
- return this.linkedListIterator.next();
376
- const o = this.sourceIterator.next();
377
- return this.setAsMemoized(o) || this.linkedList.addLast(o.value), o;
378
- };
379
- }
380
- next() {
381
- return this.internalNext();
382
- }
383
- return(t) {
384
- return this.internalNext = s, this.linkedList = null, this.linkedListIterator = null, this.internalNext = s, h(this.sourceIterator.return) ? this.sourceIterator.return(t) : s(t);
385
- }
386
- }
387
- class B {
388
- constructor(t) {
389
- n(this, "memoizedSourceIterator");
390
- this.memoizedSourceIterator = t[Symbol.iterator]();
391
- }
392
- next() {
393
- return this.memoizedSourceIterator.next();
394
- }
395
- return(t) {
396
- return this.memoizedSourceIterator.return(t);
397
- }
398
- }
399
- function C(e, t) {
400
- if (e == null)
401
- throw 'The source "iterable" must be provided';
402
- const r = e[Symbol.iterator]();
403
- let i = r.next(), o = i.value, a = null;
404
- for (t == null ? a = (u, l) => u < l ? -1 : u === l ? 0 : 1 : h(t) ? a = t : Array.isArray(t) ? a = (u, l) => {
405
- let d = 0;
406
- for (const c of t)
407
- if (d = u[c] < l[c] ? -1 : u[c] === l[c] ? 0 : 1, d !== 0)
408
- break;
409
- return d;
410
- } : a = (u, l) => u[t] < l[t] ? -1 : u[t] === l[t] ? 0 : 1, i = r.next(); i.done !== !0; i = r.next()) {
411
- const u = a(o, i.value);
412
- o = u < 0 || u === 0 ? o : i.value;
413
- }
414
- return o ?? null;
415
- }
416
- function O(e, t, r, i) {
417
- const o = t == null || t === !0 || t === !1 ? e : t, a = t == null || t === !0 || t === !1 ? 0 : e, u = a < o, l = r !== !0 && r !== !1 && r != null && r !== 0 ? r : u ? 1 : -1, d = u && l < 0 || !u && l > 0 ? -1 * l : l, c = Math.ceil(Math.abs(o - a) / Math.abs(d)), y = !!(t === !0 || r === !0 || i != null && i), x = y ? c * d + a : a;
418
- return a === o ? new dt(x, 0, 0) : y ? new ht(x, c, d) : new at(x, c, d);
419
- }
420
- class at {
421
- constructor(t, r, i) {
422
- n(this, "initialValue");
423
- n(this, "length");
424
- n(this, "step");
425
- this.initialValue = t, this.length = r, this.step = i;
426
- }
427
- [Symbol.iterator]() {
428
- return new lt(this.initialValue, this.length, this.step);
429
- }
430
- }
431
- class lt {
432
- constructor(t, r, i) {
433
- n(this, "value");
434
- n(this, "length");
435
- n(this, "step");
436
- n(this, "internalNext", () => {
437
- const t = this.value;
438
- return this.value += this.step, this.length-- ? m(t) : s();
439
- });
440
- this.value = t, this.length = r, this.step = i;
441
- }
442
- next() {
443
- return this.internalNext();
444
- }
445
- return(t) {
446
- return this.internalNext = s, s(t);
447
- }
448
- }
449
- class ht {
450
- constructor(t, r, i) {
451
- n(this, "initialValue");
452
- n(this, "length");
453
- n(this, "step");
454
- this.initialValue = t - i, this.length = r, this.step = i;
455
- }
456
- [Symbol.iterator]() {
457
- return new ct(this.initialValue, this.length, this.step);
458
- }
459
- }
460
- class ct {
461
- constructor(t, r, i) {
462
- n(this, "value");
463
- n(this, "length");
464
- n(this, "step");
465
- n(this, "internalNext", () => {
466
- const t = this.value;
467
- return this.value -= this.step, this.length-- ? m(t) : s();
468
- });
469
- this.value = t, this.length = r, this.step = i;
470
- }
471
- next() {
472
- return this.internalNext();
473
- }
474
- return(t) {
475
- return this.internalNext = s, s(t);
476
- }
477
- }
478
- class dt {
479
- constructor(t, r, i) {
480
- n(this, "initialValue");
481
- n(this, "length");
482
- n(this, "step");
483
- this.initialValue = t, this.length = r, this.step = i;
484
- }
485
- [Symbol.iterator]() {
486
- return new ft(this.initialValue, this.length, this.step);
487
- }
488
- }
489
- class ft {
490
- constructor(t, r, i) {
491
- n(this, "value");
492
- n(this, "length");
493
- n(this, "step");
494
- this.value = t, this.length = r, this.step = i;
495
- }
496
- next() {
497
- return s();
498
- }
499
- return(t) {
500
- return s(t);
501
- }
502
- }
503
- function j(e, t, r) {
504
- if (e == null)
505
- throw 'The source "iterable" must be provided';
506
- if (!h(r))
507
- throw '"reducer" function must be provided';
508
- const i = e[Symbol.iterator]();
509
- let o = t, a = 0;
510
- for (let u = i.next(); u.done !== !0; u = i.next())
511
- o = r(o, u.value, a), a++;
512
- return o;
513
- }
514
- function $(e, t) {
515
- if (t < 0)
516
- throw '"count" parameter must be greater or equal then 0';
517
- return new mt(e, t);
518
- }
519
- class mt {
520
- constructor(t, r) {
521
- n(this, "value");
522
- n(this, "count");
523
- this.value = t, this.count = r;
524
- }
525
- [Symbol.iterator]() {
526
- return new xt(this.value, this.count);
527
- }
528
- }
529
- class xt {
530
- constructor(t, r) {
531
- n(this, "leftToRepeat", 0);
532
- n(this, "value");
533
- n(this, "count");
534
- n(this, "internalNext", () => this.leftToRepeat-- ? m(this.value) : (this.internalNext = s, s()));
535
- this.value = t, this.count = r, this.leftToRepeat = r, r === 0 && (this.internalNext = s);
536
- }
537
- next() {
538
- return this.internalNext();
539
- }
540
- return(t) {
541
- return this.internalNext = s, s(t);
542
- }
543
- }
544
- function D(e, t) {
545
- if (e == null)
546
- throw 'The source "iterable" must be provided';
547
- if (!h(t))
548
- throw '"predicate" function must be provided';
549
- const r = e[Symbol.iterator]();
550
- let i = 0;
551
- for (let o = r.next(); o.done !== !0; o = r.next())
552
- if (t(o.value, i++))
553
- return !0;
554
- return !1;
555
- }
556
- function U(e, t) {
557
- if (e == null)
558
- throw 'The source "iterable" must be provided';
559
- if (!h(t))
560
- throw '"tapper" function must be provided';
561
- return new pt(e, t);
562
- }
563
- class pt {
564
- constructor(t, r) {
565
- n(this, "tapper");
566
- n(this, "source");
567
- this.source = t, this.tapper = r;
568
- }
569
- [Symbol.iterator]() {
570
- return new bt(this.source, this.tapper);
571
- }
572
- }
573
- class bt {
574
- constructor(t, r) {
575
- n(this, "index", 0);
576
- n(this, "sourceIterator");
577
- n(this, "tapper");
578
- n(this, "internalNext", () => {
579
- const t = this.sourceIterator.next();
580
- return t.done !== !0 ? (this.tapper(t.value, this.index++), t) : (this.internalNext = s, s());
581
- });
582
- this.sourceIterator = t[Symbol.iterator](), this.tapper = r;
583
- }
584
- next() {
585
- return this.internalNext();
586
- }
587
- return(t) {
588
- return this.internalNext = s, s(t);
589
- }
590
- }
591
- function J(e, t) {
592
- if (e == null)
593
- throw 'The source "iterable" must be provided';
594
- if (!h(t))
595
- throw '"tapper" function must be provided';
596
- return new It(e, t);
597
- }
598
- class It {
599
- constructor(t, r) {
600
- n(this, "tapper");
601
- n(this, "source");
602
- this.source = t, this.tapper = r;
603
- }
604
- [Symbol.iterator]() {
605
- return this.tapper(this.source, 0), this.source[Symbol.iterator]();
606
- }
607
- }
608
- const vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
609
- __proto__: null,
610
- collectToArray: X,
611
- empty: z,
612
- filter: M,
613
- flatMap: g,
614
- forEach: k,
615
- forEachAsync: T,
616
- getMemoizeDefaultOptions: P,
617
- map: L,
618
- materialize: E,
619
- max: F,
620
- memoize: V,
621
- min: C,
622
- range: O,
623
- reduce: j,
624
- repeat: $,
625
- some: D,
626
- tap: U,
627
- tapChain: J
628
- }, Symbol.toStringTag, { value: "Module" }));
629
- class f {
630
- constructor(t) {
631
- n(this, "iterable");
632
- this.iterable = t;
633
- }
634
- [Symbol.iterator]() {
635
- return this.iterable[Symbol.iterator]();
636
- }
637
- collectToArray() {
638
- return Array.from(this.iterable);
639
- }
640
- filter(t) {
641
- return new f(M(this.iterable, t));
642
- }
643
- flatMap(t) {
644
- return new f(g(this.iterable, t));
645
- }
646
- forEach(t) {
647
- return k(this.iterable, t);
648
- }
649
- forEachAsync(t) {
650
- return T(this.iterable, t);
651
- }
652
- map(t) {
653
- return new f(L(this.iterable, t));
654
- }
655
- materialize() {
656
- return new f(E(this.iterable));
657
- }
658
- max(t) {
659
- return F(this.iterable, t);
660
- }
661
- memoize(t) {
662
- return new f(V(this.iterable, t));
663
- }
664
- min(t) {
665
- return C(this.iterable, t);
666
- }
667
- reduce(t, r) {
668
- return j(this.iterable, t, r);
669
- }
670
- some(t) {
671
- return D(this.iterable, t);
672
- }
673
- tap(t) {
674
- return new f(U(this.iterable, t));
675
- }
676
- tapChain(t) {
677
- return new f(J(this.iterable, t));
678
- }
679
- tapChainCreation(t) {
680
- if (!h(t))
681
- throw '"tapper" function must be provided';
682
- return t(this), this;
683
- }
684
- }
685
- function Nt() {
686
- return N(z());
687
- }
688
- function N(e) {
689
- if (e == null)
690
- throw 'The source "iterable" must be provided';
691
- return new f(e);
692
- }
693
- function yt(e, t, r, i) {
694
- return N(O(e, t, r, i));
695
- }
696
- function St(e, t) {
697
- return N($(e, t));
698
- }
699
- export {
700
- vt as Functions,
701
- f as IterableLinqWrapper,
702
- et as Unit,
703
- Nt as empty,
704
- N as from,
705
- yt as fromRange,
706
- St as repeat,
707
- w as unit
708
- };