iterable-linq-utility 0.0.2 → 0.0.4
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/README.md +1 -1
- package/dist/combiners/index.d.ts +2 -0
- package/dist/combiners/mapper.d.ts +2 -0
- package/dist/combiners/predicate.d.ts +2 -0
- package/dist/functions/filter.d.ts +2 -0
- package/dist/functions/index.d.ts +8 -0
- package/dist/{map.d.ts → functions/map.d.ts} +2 -1
- package/dist/{materialize.d.ts → functions/materialize.d.ts} +0 -0
- package/dist/{max.d.ts → functions/max.d.ts} +0 -0
- package/dist/{memoize.d.ts → functions/memoize.d.ts} +0 -0
- package/dist/{min.d.ts → functions/min.d.ts} +1 -1
- package/dist/functions/range.d.ts +6 -0
- package/dist/{some.d.ts → functions/some.d.ts} +0 -0
- package/dist/genericCollections/index.d.ts +1 -0
- package/dist/{linkedList.d.ts → genericCollections/linkedList.d.ts} +0 -0
- package/dist/index.d.ts +4 -10
- package/dist/interable-linq-utility.js +87 -101
- package/dist/interable-linq-utility.umd.cjs +1 -1
- package/dist/linqIterable.d.ts +1 -1
- package/dist/{types.d.ts → types/comparer.d.ts} +0 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/mapper.d.ts +1 -0
- package/dist/types/predicate.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/{iteratorResults.d.ts → utils/iteratorResults.d.ts} +0 -0
- package/package.json +3 -2
- package/dist/filter.d.ts +0 -1
- package/dist/utils/combiners.d.ts +0 -2
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Work in Progress
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { Mapper } from "@/types";
|
|
2
|
+
export declare function map<T, R>(iterable: Iterable<T>, mapper: Mapper<T, R>): Iterable<R>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Comparer } from "
|
|
1
|
+
import type { Comparer } from "@/types";
|
|
2
2
|
export declare function min<T>(iterable: Iterable<T>, comparer?: Comparer<T>): T | null | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function range(end: number): Iterable<number>;
|
|
2
|
+
export declare function range(end: number, reverse?: boolean): Iterable<number>;
|
|
3
|
+
export declare function range(start: number, end: number): Iterable<number>;
|
|
4
|
+
export declare function range(start: number, end: number, step: number): Iterable<number>;
|
|
5
|
+
export declare function range(start: number, end: number, reverse: boolean): Iterable<number>;
|
|
6
|
+
export declare function range(start: number, end: number, step: number, reverse: boolean): Iterable<number>;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './linkedList';
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
|
+
import { Mapper, Predicate } from '@/types';
|
|
1
2
|
export interface ILinqIterable<T> {
|
|
2
3
|
[Symbol.iterator](): Iterator<T, any, undefined>;
|
|
3
4
|
collectToArray(): T[];
|
|
4
|
-
filter(predicate:
|
|
5
|
-
map<R>(mapper:
|
|
5
|
+
filter(predicate: Predicate<T>): ILinqIterable<T>;
|
|
6
|
+
map<R>(mapper: Mapper<T, R>): ILinqIterable<R>;
|
|
6
7
|
materialize(): ILinqIterable<T>;
|
|
7
|
-
max<T>(comparer?: (a: T, b: T, index: number) => boolean): T | null | undefined;
|
|
8
8
|
memoize(): ILinqIterable<T>;
|
|
9
9
|
some(predicate: (value: T, index: number) => boolean): boolean;
|
|
10
10
|
}
|
|
11
11
|
declare module "./linqIterable" {
|
|
12
|
-
interface LinqIterable<T> {
|
|
13
|
-
filter(predicate: (value: T, index: number) => boolean): ILinqIterable<T>;
|
|
14
|
-
map<R>(mapper: (value: T, index: number) => R): ILinqIterable<R>;
|
|
15
|
-
materialize(): ILinqIterable<T>;
|
|
16
|
-
max<T>(comparer?: (a: T, b: T, index: number) => boolean): T | null | undefined;
|
|
17
|
-
memoize(): ILinqIterable<T>;
|
|
18
|
-
some(predicate: (value: T, index: number) => boolean): boolean;
|
|
12
|
+
interface LinqIterable<T> extends ILinqIterable<T> {
|
|
19
13
|
}
|
|
20
14
|
}
|
|
21
15
|
export declare function from<T>(iterable: Iterable<T>): ILinqIterable<T>;
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
class
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var z = (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) => (z(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
class n {
|
|
5
5
|
constructor(t) {
|
|
6
|
-
|
|
6
|
+
i(this, "iterable");
|
|
7
7
|
this.iterable = t;
|
|
8
8
|
}
|
|
9
9
|
[Symbol.iterator]() {
|
|
10
10
|
return this.iterable[Symbol.iterator]();
|
|
11
11
|
}
|
|
12
|
-
source() {
|
|
13
|
-
return this.iterable;
|
|
14
|
-
}
|
|
15
12
|
collectToArray() {
|
|
16
|
-
return [...this.source
|
|
13
|
+
return [...this.source];
|
|
14
|
+
}
|
|
15
|
+
get source() {
|
|
16
|
+
return this.iterable;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return (r,
|
|
21
|
-
}
|
|
22
|
-
function w(e, t) {
|
|
23
|
-
return (r, i) => t(r, i) && e(r, i);
|
|
19
|
+
function x(e, t) {
|
|
20
|
+
return (r, o) => t(e(r, o), o);
|
|
24
21
|
}
|
|
25
|
-
function
|
|
26
|
-
return
|
|
22
|
+
function S(e, t) {
|
|
23
|
+
return (r, o) => e(r, o) && t(r, o);
|
|
27
24
|
}
|
|
28
25
|
function f(e, t) {
|
|
29
26
|
return {
|
|
@@ -34,29 +31,29 @@ function f(e, t) {
|
|
|
34
31
|
function p() {
|
|
35
32
|
return { done: !0, value: void 0 };
|
|
36
33
|
}
|
|
37
|
-
function
|
|
34
|
+
function y(e, t) {
|
|
38
35
|
return new l(e, t);
|
|
39
36
|
}
|
|
40
37
|
class l {
|
|
41
38
|
constructor(t, r) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
let
|
|
45
|
-
if (
|
|
46
|
-
const
|
|
47
|
-
|
|
39
|
+
i(this, "predicate");
|
|
40
|
+
i(this, "source");
|
|
41
|
+
let o = r, s = t;
|
|
42
|
+
if (s instanceof l) {
|
|
43
|
+
const c = s.predicate;
|
|
44
|
+
s = s.source, o = S(c, o);
|
|
48
45
|
}
|
|
49
|
-
this.source =
|
|
46
|
+
this.source = s, this.predicate = o;
|
|
50
47
|
}
|
|
51
48
|
[Symbol.iterator]() {
|
|
52
|
-
return new
|
|
49
|
+
return new b(this.source, this.predicate);
|
|
53
50
|
}
|
|
54
51
|
}
|
|
55
|
-
class
|
|
52
|
+
class b {
|
|
56
53
|
constructor(t, r) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
i(this, "index", 0);
|
|
55
|
+
i(this, "sourceIterator");
|
|
56
|
+
i(this, "predicate");
|
|
60
57
|
this.sourceIterator = t[Symbol.iterator](), this.predicate = r;
|
|
61
58
|
}
|
|
62
59
|
next() {
|
|
@@ -67,29 +64,29 @@ class k {
|
|
|
67
64
|
}
|
|
68
65
|
}
|
|
69
66
|
}
|
|
70
|
-
function
|
|
67
|
+
function w(e, t) {
|
|
71
68
|
return new h(e, t);
|
|
72
69
|
}
|
|
73
70
|
class h {
|
|
74
71
|
constructor(t, r) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
let
|
|
78
|
-
if (
|
|
79
|
-
const
|
|
80
|
-
|
|
72
|
+
i(this, "mapper");
|
|
73
|
+
i(this, "source");
|
|
74
|
+
let o = r, s = t;
|
|
75
|
+
if (s instanceof h) {
|
|
76
|
+
const c = s.mapper;
|
|
77
|
+
s = s.source, o = x(c, o);
|
|
81
78
|
}
|
|
82
|
-
this.source = t, this.mapper =
|
|
79
|
+
this.source = t, this.mapper = o;
|
|
83
80
|
}
|
|
84
81
|
[Symbol.iterator]() {
|
|
85
|
-
return new
|
|
82
|
+
return new L(this.source, this.mapper);
|
|
86
83
|
}
|
|
87
84
|
}
|
|
88
|
-
class
|
|
85
|
+
class L {
|
|
89
86
|
constructor(t, r) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
i(this, "index", 0);
|
|
88
|
+
i(this, "sourceIterator");
|
|
89
|
+
i(this, "mapper");
|
|
93
90
|
this.sourceIterator = t[Symbol.iterator](), this.mapper = r;
|
|
94
91
|
}
|
|
95
92
|
next() {
|
|
@@ -97,15 +94,15 @@ class N {
|
|
|
97
94
|
return t.done !== !0 ? f(!1, this.mapper(t.value, this.index++)) : p();
|
|
98
95
|
}
|
|
99
96
|
}
|
|
100
|
-
function
|
|
97
|
+
function M(e) {
|
|
101
98
|
const t = e[Symbol.iterator](), r = new a();
|
|
102
|
-
for (let
|
|
103
|
-
r.addLast(
|
|
99
|
+
for (let o = t.next(); o.done !== !0; o = t.next())
|
|
100
|
+
r.addLast(o.value);
|
|
104
101
|
return r;
|
|
105
102
|
}
|
|
106
|
-
class
|
|
103
|
+
class k {
|
|
107
104
|
constructor(t = null) {
|
|
108
|
-
|
|
105
|
+
i(this, "current", null);
|
|
109
106
|
this.current = t;
|
|
110
107
|
}
|
|
111
108
|
next() {
|
|
@@ -115,12 +112,12 @@ class F {
|
|
|
115
112
|
}
|
|
116
113
|
class a {
|
|
117
114
|
constructor() {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
115
|
+
i(this, "internalSize", 0);
|
|
116
|
+
i(this, "head", null);
|
|
117
|
+
i(this, "tail", null);
|
|
121
118
|
}
|
|
122
119
|
[Symbol.iterator]() {
|
|
123
|
-
return new
|
|
120
|
+
return new k(this.head);
|
|
124
121
|
}
|
|
125
122
|
addFirst(t) {
|
|
126
123
|
const r = {
|
|
@@ -154,62 +151,54 @@ class a {
|
|
|
154
151
|
return this.internalSize;
|
|
155
152
|
}
|
|
156
153
|
}
|
|
157
|
-
function
|
|
154
|
+
function N(e) {
|
|
158
155
|
return e instanceof d ? e : new d(e);
|
|
159
156
|
}
|
|
160
157
|
class d {
|
|
161
158
|
constructor(t) {
|
|
162
|
-
|
|
159
|
+
i(this, "source");
|
|
163
160
|
if (t instanceof a) {
|
|
164
161
|
this.source = t;
|
|
165
162
|
return;
|
|
166
163
|
}
|
|
167
|
-
this.source =
|
|
164
|
+
this.source = M(t);
|
|
168
165
|
}
|
|
169
166
|
[Symbol.iterator]() {
|
|
170
|
-
return new
|
|
167
|
+
return new v(this.source);
|
|
171
168
|
}
|
|
172
169
|
}
|
|
173
|
-
class
|
|
170
|
+
class v {
|
|
174
171
|
constructor(t) {
|
|
175
|
-
|
|
172
|
+
i(this, "sourceIterator");
|
|
176
173
|
this.sourceIterator = t[Symbol.iterator]();
|
|
177
174
|
}
|
|
178
175
|
next() {
|
|
179
176
|
return this.sourceIterator.next();
|
|
180
177
|
}
|
|
181
178
|
}
|
|
182
|
-
function
|
|
183
|
-
const r = e[Symbol.iterator]();
|
|
184
|
-
let i = 0, n = r.next(), s = n.value;
|
|
185
|
-
const I = L(t) ? t : (x, z) => x > z;
|
|
186
|
-
for (n = r.next(); n.done !== !0; n = r.next())
|
|
187
|
-
s = I(s, n.value, i++) ? s : n.value;
|
|
188
|
-
return s == null ? null : s;
|
|
189
|
-
}
|
|
190
|
-
function q(e) {
|
|
179
|
+
function g(e) {
|
|
191
180
|
return e instanceof m ? e : new m(e);
|
|
192
181
|
}
|
|
193
182
|
class m {
|
|
194
183
|
constructor(t) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
184
|
+
i(this, "isMemoized", !1);
|
|
185
|
+
i(this, "sourceIterator");
|
|
186
|
+
i(this, "linkedList", new a());
|
|
187
|
+
i(this, "source");
|
|
199
188
|
this.source = t, this.sourceIterator = t[Symbol.iterator](), t instanceof a && (this.linkedList = t, this.isMemoized = !0);
|
|
200
189
|
}
|
|
201
190
|
[Symbol.iterator]() {
|
|
202
|
-
return this.isMemoized ? new
|
|
191
|
+
return this.isMemoized ? new F(this.linkedList) : new A(this.sourceIterator, this.linkedList, (t) => this.isMemoized = t.done === !0);
|
|
203
192
|
}
|
|
204
193
|
}
|
|
205
|
-
class
|
|
206
|
-
constructor(t, r,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
this.linkedList = r, this.linkedListIterator = r[Symbol.iterator](), this.setAsMemoized =
|
|
194
|
+
class A {
|
|
195
|
+
constructor(t, r, o) {
|
|
196
|
+
i(this, "index", 0);
|
|
197
|
+
i(this, "linkedList");
|
|
198
|
+
i(this, "linkedListIterator");
|
|
199
|
+
i(this, "setAsMemoized");
|
|
200
|
+
i(this, "sourceIterator");
|
|
201
|
+
this.linkedList = r, this.linkedListIterator = r[Symbol.iterator](), this.setAsMemoized = o, this.sourceIterator = t;
|
|
213
202
|
}
|
|
214
203
|
next() {
|
|
215
204
|
if (this.linkedList.size() > this.index++)
|
|
@@ -218,44 +207,41 @@ class D {
|
|
|
218
207
|
return this.setAsMemoized(t) || this.linkedList.addLast(t.value), t;
|
|
219
208
|
}
|
|
220
209
|
}
|
|
221
|
-
class
|
|
210
|
+
class F {
|
|
222
211
|
constructor(t) {
|
|
223
|
-
|
|
212
|
+
i(this, "memoizedSourceIterator");
|
|
224
213
|
this.memoizedSourceIterator = t[Symbol.iterator]();
|
|
225
214
|
}
|
|
226
215
|
next() {
|
|
227
216
|
return this.memoizedSourceIterator.next();
|
|
228
217
|
}
|
|
229
218
|
}
|
|
230
|
-
function
|
|
219
|
+
function P(e, t) {
|
|
231
220
|
const r = e[Symbol.iterator]();
|
|
232
|
-
let
|
|
233
|
-
for (let
|
|
234
|
-
if (t(
|
|
221
|
+
let o = 0;
|
|
222
|
+
for (let s = r.next(); s.done !== !0; s = r.next())
|
|
223
|
+
if (t(s.value, o++))
|
|
235
224
|
return !0;
|
|
236
225
|
return !1;
|
|
237
226
|
}
|
|
238
|
-
function
|
|
239
|
-
return new
|
|
227
|
+
function u(e) {
|
|
228
|
+
return new n(e);
|
|
240
229
|
}
|
|
241
|
-
|
|
242
|
-
return
|
|
243
|
-
};
|
|
244
|
-
u.prototype.map = function(e) {
|
|
245
|
-
return c(v(this.source(), e));
|
|
230
|
+
n.prototype.filter = function(e) {
|
|
231
|
+
return u(y(this.source, e));
|
|
246
232
|
};
|
|
247
|
-
|
|
248
|
-
return
|
|
233
|
+
n.prototype.map = function(e) {
|
|
234
|
+
return u(w(this.source, e));
|
|
249
235
|
};
|
|
250
|
-
|
|
251
|
-
return
|
|
236
|
+
n.prototype.materialize = function() {
|
|
237
|
+
return u(N(this.source));
|
|
252
238
|
};
|
|
253
|
-
|
|
254
|
-
return
|
|
239
|
+
n.prototype.memoize = function() {
|
|
240
|
+
return u(g(this.source));
|
|
255
241
|
};
|
|
256
|
-
|
|
257
|
-
return
|
|
242
|
+
n.prototype.some = function(e) {
|
|
243
|
+
return P(this.source, e);
|
|
258
244
|
};
|
|
259
245
|
export {
|
|
260
|
-
|
|
246
|
+
u as from
|
|
261
247
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(u,
|
|
1
|
+
(function(u,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(u=typeof globalThis<"u"?globalThis:u||self,n(u["interable-linq-utility"]={}))})(this,function(u){"use strict";var T=Object.defineProperty;var F=(u,n,a)=>n in u?T(u,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):u[n]=a;var i=(u,n,a)=>(F(u,typeof n!="symbol"?n+"":n,a),a);class n{constructor(t){i(this,"iterable");this.iterable=t}[Symbol.iterator](){return this.iterable[Symbol.iterator]()}collectToArray(){return[...this.source]}get source(){return this.iterable}}function a(e,t){return(r,o)=>t(e(r,o),o)}function x(e,t){return(r,o)=>e(r,o)&&t(r,o)}function m(e,t){return{done:e,value:t}}function p(){return{done:!0,value:void 0}}function R(e){return e}function S(e,t){return new d(e,t)}class d{constructor(t,r){i(this,"predicate");i(this,"source");let o=r,s=t;if(s instanceof d){const f=s.predicate;s=s.source,o=x(f,o)}this.source=s,this.predicate=o}[Symbol.iterator](){return new y(this.source,this.predicate)}}class y{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 o=r,s=t;if(s instanceof h){const f=s.mapper;s=s.source,o=a(f,o)}this.source=t,this.mapper=o}[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?m(!1,this.mapper(t.value,this.index++)):p()}}function L(e){const t=e[Symbol.iterator](),r=new l;for(let o=t.next();o.done!==!0;o=t.next())r.addLast(o.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,m(!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=L(t)}[Symbol.iterator](){return new v(this.source)}}class v{constructor(t){i(this,"sourceIterator");this.sourceIterator=t[Symbol.iterator]()}next(){return this.sourceIterator.next()}}function N(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 A(this.linkedList):new g(this.sourceIterator,this.linkedList,t=>this.isMemoized=t.done===!0)}}class g{constructor(t,r,o){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=o,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 A{constructor(t){i(this,"memoizedSourceIterator");this.memoizedSourceIterator=t[Symbol.iterator]()}next(){return this.memoizedSourceIterator.next()}}function P(e,t){const r=e[Symbol.iterator]();let o=0;for(let s=r.next();s.done!==!0;s=r.next())if(t(s.value,o++))return!0;return!1}function c(e){return new n(e)}n.prototype.filter=function(e){return c(S(this.source,e))},n.prototype.map=function(e){return c(b(this.source,e))},n.prototype.materialize=function(){return c(k(this.source))},n.prototype.memoize=function(){return c(N(this.source))},n.prototype.some=function(e){return P(this.source,e)},u.from=c,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/linqIterable.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
declare type ComparerFunction<T> = (a: T, b: T, index: number) => number;
|
|
2
2
|
declare type ComparingProps<T> = keyof T | Array<keyof T>;
|
|
3
3
|
export declare type Comparer<T> = ComparerFunction<T> | ComparingProps<T>;
|
|
4
|
-
export declare type Mapper<T, R> = (value: T, index: number) => R;
|
|
5
4
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type Mapper<T, R> = (value: T, index: number) => R;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type Predicate<T> = (value: T, index: number) => boolean;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './iteratorResults';
|
|
2
2
|
export * from './utils';
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iterable-linq-utility",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "An Iterable mutation utility inspired by .net Linq and Javascript Array interface",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/my-lib.umd.cjs",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "tsc && vite build",
|
|
19
|
+
"build": "tsc -p tsconfig.build.json && vite build",
|
|
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",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"typescript": "4.9.3",
|
|
50
50
|
"vite": "3.2.4",
|
|
51
51
|
"vite-plugin-dts": "1.7.1",
|
|
52
|
+
"vite-tsconfig-paths": "3.6.0",
|
|
52
53
|
"vitest": "0.25.3"
|
|
53
54
|
}
|
|
54
55
|
}
|
package/dist/filter.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function filter<T>(iterable: Iterable<T>, predicate: (value: T, index: number) => boolean): Iterable<T>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare function combineMappers<T, R, RR>(m1: (value: T, index: number) => R, m2: (value: R, index: number) => RR): (value: T, index: number) => RR;
|
|
2
|
-
export declare function combinePredicates<T>(m1: (value: T, index: number) => boolean, m2: (value: T, index: number) => boolean): (value: T, index: number) => boolean;
|