@bemoje/iter 1.0.1 → 1.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.
- package/lib/filterArray.cjs +18 -0
- package/lib/filterArray.d.cts +18 -0
- package/lib/filterArray.d.ts +18 -0
- package/lib/filterArray.js +16 -0
- package/lib/filterIterable.cjs +14 -0
- package/lib/filterIterable.d.cts +18 -0
- package/lib/filterIterable.d.ts +18 -0
- package/lib/filterIterable.js +11 -0
- package/lib/filterIterableEntries.cjs +12 -0
- package/lib/filterIterableEntries.d.cts +18 -0
- package/lib/filterIterableEntries.d.ts +18 -0
- package/lib/filterIterableEntries.js +9 -0
- package/lib/filterIterableKeys.cjs +14 -0
- package/lib/filterIterableKeys.d.cts +18 -0
- package/lib/filterIterableKeys.d.ts +18 -0
- package/lib/filterIterableKeys.js +11 -0
- package/lib/filterIterableValues.cjs +14 -0
- package/lib/filterIterableValues.d.cts +18 -0
- package/lib/filterIterableValues.d.ts +18 -0
- package/lib/filterIterableValues.js +11 -0
- package/lib/filterMap.cjs +16 -0
- package/lib/filterMap.d.cts +18 -0
- package/lib/filterMap.d.ts +18 -0
- package/lib/filterMap.js +14 -0
- package/lib/filterObject.cjs +18 -0
- package/lib/filterObject.d.cts +18 -0
- package/lib/filterObject.d.ts +18 -0
- package/lib/filterObject.js +15 -0
- package/lib/filterSet.cjs +16 -0
- package/lib/filterSet.d.cts +18 -0
- package/lib/filterSet.d.ts +18 -0
- package/lib/filterSet.js +14 -0
- package/lib/forEachArray.cjs +14 -0
- package/lib/forEachArray.d.cts +17 -0
- package/lib/forEachArray.d.ts +17 -0
- package/lib/forEachArray.js +12 -0
- package/lib/forEachIterable.cjs +14 -0
- package/lib/forEachIterable.d.cts +17 -0
- package/lib/forEachIterable.d.ts +17 -0
- package/lib/forEachIterable.js +11 -0
- package/lib/forEachIterableEntries.cjs +14 -0
- package/lib/forEachIterableEntries.d.cts +6 -0
- package/lib/forEachIterableEntries.d.ts +6 -0
- package/lib/forEachIterableEntries.js +11 -0
- package/lib/forEachIterableKeys.cjs +14 -0
- package/lib/forEachIterableKeys.d.cts +17 -0
- package/lib/forEachIterableKeys.d.ts +17 -0
- package/lib/forEachIterableKeys.js +11 -0
- package/lib/forEachIterableValues.cjs +14 -0
- package/lib/forEachIterableValues.d.cts +17 -0
- package/lib/forEachIterableValues.d.ts +17 -0
- package/lib/forEachIterableValues.js +11 -0
- package/lib/forEachMap.cjs +12 -0
- package/lib/forEachMap.d.cts +17 -0
- package/lib/forEachMap.d.ts +17 -0
- package/lib/forEachMap.js +10 -0
- package/lib/forEachObject.cjs +14 -0
- package/lib/forEachObject.d.cts +17 -0
- package/lib/forEachObject.d.ts +17 -0
- package/lib/forEachObject.js +11 -0
- package/lib/forEachSet.cjs +12 -0
- package/lib/forEachSet.d.cts +17 -0
- package/lib/forEachSet.d.ts +17 -0
- package/lib/forEachSet.js +10 -0
- package/lib/index.cjs +236 -0
- package/lib/index.d.cts +33 -0
- package/lib/index.d.ts +33 -0
- package/lib/index.js +33 -0
- package/lib/mapArray.cjs +16 -0
- package/lib/mapArray.d.cts +17 -0
- package/lib/mapArray.d.ts +17 -0
- package/lib/mapArray.js +14 -0
- package/lib/mapIterable.cjs +14 -0
- package/lib/mapIterable.d.cts +17 -0
- package/lib/mapIterable.d.ts +17 -0
- package/lib/mapIterable.js +11 -0
- package/lib/mapIterableEntries.cjs +12 -0
- package/lib/mapIterableEntries.d.cts +17 -0
- package/lib/mapIterableEntries.d.ts +17 -0
- package/lib/mapIterableEntries.js +9 -0
- package/lib/mapIterableKeys.cjs +17 -0
- package/lib/mapIterableKeys.d.cts +17 -0
- package/lib/mapIterableKeys.d.ts +17 -0
- package/lib/mapIterableKeys.js +14 -0
- package/lib/mapIterableValues.cjs +17 -0
- package/lib/mapIterableValues.d.cts +17 -0
- package/lib/mapIterableValues.d.ts +17 -0
- package/lib/mapIterableValues.js +14 -0
- package/lib/mapMap.cjs +14 -0
- package/lib/mapMap.d.cts +17 -0
- package/lib/mapMap.d.ts +17 -0
- package/lib/mapMap.js +12 -0
- package/lib/mapObject.cjs +16 -0
- package/lib/mapObject.d.cts +17 -0
- package/lib/mapObject.d.ts +17 -0
- package/lib/mapObject.js +13 -0
- package/lib/mapSet.cjs +14 -0
- package/lib/mapSet.d.cts +17 -0
- package/lib/mapSet.d.ts +17 -0
- package/lib/mapSet.js +12 -0
- package/lib/reduceArray.cjs +16 -0
- package/lib/reduceArray.d.cts +18 -0
- package/lib/reduceArray.d.ts +18 -0
- package/lib/reduceArray.js +14 -0
- package/lib/reduceIterable.cjs +14 -0
- package/lib/reduceIterable.d.cts +18 -0
- package/lib/reduceIterable.d.ts +18 -0
- package/lib/reduceIterable.js +12 -0
- package/lib/reduceIterableEntries.cjs +14 -0
- package/lib/reduceIterableEntries.d.cts +18 -0
- package/lib/reduceIterableEntries.d.ts +18 -0
- package/lib/reduceIterableEntries.js +12 -0
- package/lib/reduceIterableKeys.cjs +14 -0
- package/lib/reduceIterableKeys.d.cts +18 -0
- package/lib/reduceIterableKeys.d.ts +18 -0
- package/lib/reduceIterableKeys.js +12 -0
- package/lib/reduceIterableValues.cjs +14 -0
- package/lib/reduceIterableValues.d.cts +18 -0
- package/lib/reduceIterableValues.d.ts +18 -0
- package/lib/reduceIterableValues.js +12 -0
- package/lib/reduceMap.cjs +14 -0
- package/lib/reduceMap.d.cts +18 -0
- package/lib/reduceMap.d.ts +18 -0
- package/lib/reduceMap.js +12 -0
- package/lib/reduceObject.cjs +16 -0
- package/lib/reduceObject.d.cts +18 -0
- package/lib/reduceObject.d.ts +18 -0
- package/lib/reduceObject.js +13 -0
- package/lib/reduceSet.cjs +14 -0
- package/lib/reduceSet.d.cts +18 -0
- package/lib/reduceSet.d.ts +18 -0
- package/lib/reduceSet.js +12 -0
- package/lib/toObjectIterable.cjs +18 -0
- package/lib/toObjectIterable.d.cts +7 -0
- package/lib/toObjectIterable.d.ts +7 -0
- package/lib/toObjectIterable.js +16 -0
- package/package.json +500 -18
- package/index.d.ts +0 -109
- package/index.mjs +0 -227
package/package.json
CHANGED
|
@@ -1,34 +1,516 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bemoje/iter",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "
|
|
5
|
-
"type": "module",
|
|
6
|
-
"sideEffects": false,
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Utility functions for working with iterables, especially map-like key-value pair structures.",
|
|
7
5
|
"keywords": [
|
|
8
|
-
"iter"
|
|
6
|
+
"iter",
|
|
7
|
+
"iterable",
|
|
8
|
+
"iterator",
|
|
9
|
+
"map",
|
|
10
|
+
"key-value",
|
|
11
|
+
"utilities",
|
|
12
|
+
"typescript"
|
|
9
13
|
],
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./index.d.ts",
|
|
13
|
-
"import": "./index.mjs",
|
|
14
|
-
"default": "./index.mjs"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
14
|
"dependencies": {
|
|
18
15
|
"iter-tools": "^7.5.4"
|
|
19
16
|
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"sideEffects": false,
|
|
20
19
|
"publishConfig": {
|
|
21
20
|
"access": "public"
|
|
22
21
|
},
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
22
|
+
"main": "./lib/index.cjs",
|
|
23
|
+
"module": "./lib/index.js",
|
|
24
|
+
"types": "./lib/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"import": {
|
|
28
|
+
"types": "./lib/index.d.ts",
|
|
29
|
+
"default": "./lib/index.js"
|
|
30
|
+
},
|
|
31
|
+
"require": {
|
|
32
|
+
"types": "./lib/index.d.cts",
|
|
33
|
+
"default": "./lib/index.cjs"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"./filterArray": {
|
|
37
|
+
"import": {
|
|
38
|
+
"types": "./lib/filterArray.d.ts",
|
|
39
|
+
"default": "./lib/filterArray.js"
|
|
40
|
+
},
|
|
41
|
+
"require": {
|
|
42
|
+
"types": "./lib/filterArray.d.cts",
|
|
43
|
+
"default": "./lib/filterArray.cjs"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"./filterIterable": {
|
|
47
|
+
"import": {
|
|
48
|
+
"types": "./lib/filterIterable.d.ts",
|
|
49
|
+
"default": "./lib/filterIterable.js"
|
|
50
|
+
},
|
|
51
|
+
"require": {
|
|
52
|
+
"types": "./lib/filterIterable.d.cts",
|
|
53
|
+
"default": "./lib/filterIterable.cjs"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"./filterIterableEntries": {
|
|
57
|
+
"import": {
|
|
58
|
+
"types": "./lib/filterIterableEntries.d.ts",
|
|
59
|
+
"default": "./lib/filterIterableEntries.js"
|
|
60
|
+
},
|
|
61
|
+
"require": {
|
|
62
|
+
"types": "./lib/filterIterableEntries.d.cts",
|
|
63
|
+
"default": "./lib/filterIterableEntries.cjs"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"./filterIterableKeys": {
|
|
67
|
+
"import": {
|
|
68
|
+
"types": "./lib/filterIterableKeys.d.ts",
|
|
69
|
+
"default": "./lib/filterIterableKeys.js"
|
|
70
|
+
},
|
|
71
|
+
"require": {
|
|
72
|
+
"types": "./lib/filterIterableKeys.d.cts",
|
|
73
|
+
"default": "./lib/filterIterableKeys.cjs"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"./filterIterableValues": {
|
|
77
|
+
"import": {
|
|
78
|
+
"types": "./lib/filterIterableValues.d.ts",
|
|
79
|
+
"default": "./lib/filterIterableValues.js"
|
|
80
|
+
},
|
|
81
|
+
"require": {
|
|
82
|
+
"types": "./lib/filterIterableValues.d.cts",
|
|
83
|
+
"default": "./lib/filterIterableValues.cjs"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"./filterMap": {
|
|
87
|
+
"import": {
|
|
88
|
+
"types": "./lib/filterMap.d.ts",
|
|
89
|
+
"default": "./lib/filterMap.js"
|
|
90
|
+
},
|
|
91
|
+
"require": {
|
|
92
|
+
"types": "./lib/filterMap.d.cts",
|
|
93
|
+
"default": "./lib/filterMap.cjs"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"./filterObject": {
|
|
97
|
+
"import": {
|
|
98
|
+
"types": "./lib/filterObject.d.ts",
|
|
99
|
+
"default": "./lib/filterObject.js"
|
|
100
|
+
},
|
|
101
|
+
"require": {
|
|
102
|
+
"types": "./lib/filterObject.d.cts",
|
|
103
|
+
"default": "./lib/filterObject.cjs"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"./filterSet": {
|
|
107
|
+
"import": {
|
|
108
|
+
"types": "./lib/filterSet.d.ts",
|
|
109
|
+
"default": "./lib/filterSet.js"
|
|
110
|
+
},
|
|
111
|
+
"require": {
|
|
112
|
+
"types": "./lib/filterSet.d.cts",
|
|
113
|
+
"default": "./lib/filterSet.cjs"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"./forEachArray": {
|
|
117
|
+
"import": {
|
|
118
|
+
"types": "./lib/forEachArray.d.ts",
|
|
119
|
+
"default": "./lib/forEachArray.js"
|
|
120
|
+
},
|
|
121
|
+
"require": {
|
|
122
|
+
"types": "./lib/forEachArray.d.cts",
|
|
123
|
+
"default": "./lib/forEachArray.cjs"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"./forEachIterable": {
|
|
127
|
+
"import": {
|
|
128
|
+
"types": "./lib/forEachIterable.d.ts",
|
|
129
|
+
"default": "./lib/forEachIterable.js"
|
|
130
|
+
},
|
|
131
|
+
"require": {
|
|
132
|
+
"types": "./lib/forEachIterable.d.cts",
|
|
133
|
+
"default": "./lib/forEachIterable.cjs"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"./forEachIterableEntries": {
|
|
137
|
+
"import": {
|
|
138
|
+
"types": "./lib/forEachIterableEntries.d.ts",
|
|
139
|
+
"default": "./lib/forEachIterableEntries.js"
|
|
140
|
+
},
|
|
141
|
+
"require": {
|
|
142
|
+
"types": "./lib/forEachIterableEntries.d.cts",
|
|
143
|
+
"default": "./lib/forEachIterableEntries.cjs"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"./forEachIterableKeys": {
|
|
147
|
+
"import": {
|
|
148
|
+
"types": "./lib/forEachIterableKeys.d.ts",
|
|
149
|
+
"default": "./lib/forEachIterableKeys.js"
|
|
150
|
+
},
|
|
151
|
+
"require": {
|
|
152
|
+
"types": "./lib/forEachIterableKeys.d.cts",
|
|
153
|
+
"default": "./lib/forEachIterableKeys.cjs"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"./forEachIterableValues": {
|
|
157
|
+
"import": {
|
|
158
|
+
"types": "./lib/forEachIterableValues.d.ts",
|
|
159
|
+
"default": "./lib/forEachIterableValues.js"
|
|
160
|
+
},
|
|
161
|
+
"require": {
|
|
162
|
+
"types": "./lib/forEachIterableValues.d.cts",
|
|
163
|
+
"default": "./lib/forEachIterableValues.cjs"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"./forEachMap": {
|
|
167
|
+
"import": {
|
|
168
|
+
"types": "./lib/forEachMap.d.ts",
|
|
169
|
+
"default": "./lib/forEachMap.js"
|
|
170
|
+
},
|
|
171
|
+
"require": {
|
|
172
|
+
"types": "./lib/forEachMap.d.cts",
|
|
173
|
+
"default": "./lib/forEachMap.cjs"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"./forEachObject": {
|
|
177
|
+
"import": {
|
|
178
|
+
"types": "./lib/forEachObject.d.ts",
|
|
179
|
+
"default": "./lib/forEachObject.js"
|
|
180
|
+
},
|
|
181
|
+
"require": {
|
|
182
|
+
"types": "./lib/forEachObject.d.cts",
|
|
183
|
+
"default": "./lib/forEachObject.cjs"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"./forEachSet": {
|
|
187
|
+
"import": {
|
|
188
|
+
"types": "./lib/forEachSet.d.ts",
|
|
189
|
+
"default": "./lib/forEachSet.js"
|
|
190
|
+
},
|
|
191
|
+
"require": {
|
|
192
|
+
"types": "./lib/forEachSet.d.cts",
|
|
193
|
+
"default": "./lib/forEachSet.cjs"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"./mapArray": {
|
|
197
|
+
"import": {
|
|
198
|
+
"types": "./lib/mapArray.d.ts",
|
|
199
|
+
"default": "./lib/mapArray.js"
|
|
200
|
+
},
|
|
201
|
+
"require": {
|
|
202
|
+
"types": "./lib/mapArray.d.cts",
|
|
203
|
+
"default": "./lib/mapArray.cjs"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"./mapIterable": {
|
|
207
|
+
"import": {
|
|
208
|
+
"types": "./lib/mapIterable.d.ts",
|
|
209
|
+
"default": "./lib/mapIterable.js"
|
|
210
|
+
},
|
|
211
|
+
"require": {
|
|
212
|
+
"types": "./lib/mapIterable.d.cts",
|
|
213
|
+
"default": "./lib/mapIterable.cjs"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"./mapIterableEntries": {
|
|
217
|
+
"import": {
|
|
218
|
+
"types": "./lib/mapIterableEntries.d.ts",
|
|
219
|
+
"default": "./lib/mapIterableEntries.js"
|
|
220
|
+
},
|
|
221
|
+
"require": {
|
|
222
|
+
"types": "./lib/mapIterableEntries.d.cts",
|
|
223
|
+
"default": "./lib/mapIterableEntries.cjs"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"./mapIterableKeys": {
|
|
227
|
+
"import": {
|
|
228
|
+
"types": "./lib/mapIterableKeys.d.ts",
|
|
229
|
+
"default": "./lib/mapIterableKeys.js"
|
|
230
|
+
},
|
|
231
|
+
"require": {
|
|
232
|
+
"types": "./lib/mapIterableKeys.d.cts",
|
|
233
|
+
"default": "./lib/mapIterableKeys.cjs"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"./mapIterableValues": {
|
|
237
|
+
"import": {
|
|
238
|
+
"types": "./lib/mapIterableValues.d.ts",
|
|
239
|
+
"default": "./lib/mapIterableValues.js"
|
|
240
|
+
},
|
|
241
|
+
"require": {
|
|
242
|
+
"types": "./lib/mapIterableValues.d.cts",
|
|
243
|
+
"default": "./lib/mapIterableValues.cjs"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"./mapMap": {
|
|
247
|
+
"import": {
|
|
248
|
+
"types": "./lib/mapMap.d.ts",
|
|
249
|
+
"default": "./lib/mapMap.js"
|
|
250
|
+
},
|
|
251
|
+
"require": {
|
|
252
|
+
"types": "./lib/mapMap.d.cts",
|
|
253
|
+
"default": "./lib/mapMap.cjs"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"./mapObject": {
|
|
257
|
+
"import": {
|
|
258
|
+
"types": "./lib/mapObject.d.ts",
|
|
259
|
+
"default": "./lib/mapObject.js"
|
|
260
|
+
},
|
|
261
|
+
"require": {
|
|
262
|
+
"types": "./lib/mapObject.d.cts",
|
|
263
|
+
"default": "./lib/mapObject.cjs"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"./mapSet": {
|
|
267
|
+
"import": {
|
|
268
|
+
"types": "./lib/mapSet.d.ts",
|
|
269
|
+
"default": "./lib/mapSet.js"
|
|
270
|
+
},
|
|
271
|
+
"require": {
|
|
272
|
+
"types": "./lib/mapSet.d.cts",
|
|
273
|
+
"default": "./lib/mapSet.cjs"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"./reduceArray": {
|
|
277
|
+
"import": {
|
|
278
|
+
"types": "./lib/reduceArray.d.ts",
|
|
279
|
+
"default": "./lib/reduceArray.js"
|
|
280
|
+
},
|
|
281
|
+
"require": {
|
|
282
|
+
"types": "./lib/reduceArray.d.cts",
|
|
283
|
+
"default": "./lib/reduceArray.cjs"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"./reduceIterable": {
|
|
287
|
+
"import": {
|
|
288
|
+
"types": "./lib/reduceIterable.d.ts",
|
|
289
|
+
"default": "./lib/reduceIterable.js"
|
|
290
|
+
},
|
|
291
|
+
"require": {
|
|
292
|
+
"types": "./lib/reduceIterable.d.cts",
|
|
293
|
+
"default": "./lib/reduceIterable.cjs"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"./reduceIterableEntries": {
|
|
297
|
+
"import": {
|
|
298
|
+
"types": "./lib/reduceIterableEntries.d.ts",
|
|
299
|
+
"default": "./lib/reduceIterableEntries.js"
|
|
300
|
+
},
|
|
301
|
+
"require": {
|
|
302
|
+
"types": "./lib/reduceIterableEntries.d.cts",
|
|
303
|
+
"default": "./lib/reduceIterableEntries.cjs"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"./reduceIterableKeys": {
|
|
307
|
+
"import": {
|
|
308
|
+
"types": "./lib/reduceIterableKeys.d.ts",
|
|
309
|
+
"default": "./lib/reduceIterableKeys.js"
|
|
310
|
+
},
|
|
311
|
+
"require": {
|
|
312
|
+
"types": "./lib/reduceIterableKeys.d.cts",
|
|
313
|
+
"default": "./lib/reduceIterableKeys.cjs"
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"./reduceIterableValues": {
|
|
317
|
+
"import": {
|
|
318
|
+
"types": "./lib/reduceIterableValues.d.ts",
|
|
319
|
+
"default": "./lib/reduceIterableValues.js"
|
|
320
|
+
},
|
|
321
|
+
"require": {
|
|
322
|
+
"types": "./lib/reduceIterableValues.d.cts",
|
|
323
|
+
"default": "./lib/reduceIterableValues.cjs"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"./reduceMap": {
|
|
327
|
+
"import": {
|
|
328
|
+
"types": "./lib/reduceMap.d.ts",
|
|
329
|
+
"default": "./lib/reduceMap.js"
|
|
330
|
+
},
|
|
331
|
+
"require": {
|
|
332
|
+
"types": "./lib/reduceMap.d.cts",
|
|
333
|
+
"default": "./lib/reduceMap.cjs"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"./reduceObject": {
|
|
337
|
+
"import": {
|
|
338
|
+
"types": "./lib/reduceObject.d.ts",
|
|
339
|
+
"default": "./lib/reduceObject.js"
|
|
340
|
+
},
|
|
341
|
+
"require": {
|
|
342
|
+
"types": "./lib/reduceObject.d.cts",
|
|
343
|
+
"default": "./lib/reduceObject.cjs"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"./reduceSet": {
|
|
347
|
+
"import": {
|
|
348
|
+
"types": "./lib/reduceSet.d.ts",
|
|
349
|
+
"default": "./lib/reduceSet.js"
|
|
350
|
+
},
|
|
351
|
+
"require": {
|
|
352
|
+
"types": "./lib/reduceSet.d.cts",
|
|
353
|
+
"default": "./lib/reduceSet.cjs"
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"./toObjectIterable": {
|
|
357
|
+
"import": {
|
|
358
|
+
"types": "./lib/toObjectIterable.d.ts",
|
|
359
|
+
"default": "./lib/toObjectIterable.js"
|
|
360
|
+
},
|
|
361
|
+
"require": {
|
|
362
|
+
"types": "./lib/toObjectIterable.d.cts",
|
|
363
|
+
"default": "./lib/toObjectIterable.cjs"
|
|
364
|
+
}
|
|
365
|
+
}
|
|
28
366
|
},
|
|
367
|
+
"files": [
|
|
368
|
+
"./lib/index.js",
|
|
369
|
+
"./lib/index.d.ts",
|
|
370
|
+
"./lib/index.cjs",
|
|
371
|
+
"./lib/index.d.cts",
|
|
372
|
+
"./lib/filterArray.js",
|
|
373
|
+
"./lib/filterArray.d.ts",
|
|
374
|
+
"./lib/filterArray.cjs",
|
|
375
|
+
"./lib/filterArray.d.cts",
|
|
376
|
+
"./lib/filterIterable.js",
|
|
377
|
+
"./lib/filterIterable.d.ts",
|
|
378
|
+
"./lib/filterIterable.cjs",
|
|
379
|
+
"./lib/filterIterable.d.cts",
|
|
380
|
+
"./lib/filterIterableEntries.js",
|
|
381
|
+
"./lib/filterIterableEntries.d.ts",
|
|
382
|
+
"./lib/filterIterableEntries.cjs",
|
|
383
|
+
"./lib/filterIterableEntries.d.cts",
|
|
384
|
+
"./lib/filterIterableKeys.js",
|
|
385
|
+
"./lib/filterIterableKeys.d.ts",
|
|
386
|
+
"./lib/filterIterableKeys.cjs",
|
|
387
|
+
"./lib/filterIterableKeys.d.cts",
|
|
388
|
+
"./lib/filterIterableValues.js",
|
|
389
|
+
"./lib/filterIterableValues.d.ts",
|
|
390
|
+
"./lib/filterIterableValues.cjs",
|
|
391
|
+
"./lib/filterIterableValues.d.cts",
|
|
392
|
+
"./lib/filterMap.js",
|
|
393
|
+
"./lib/filterMap.d.ts",
|
|
394
|
+
"./lib/filterMap.cjs",
|
|
395
|
+
"./lib/filterMap.d.cts",
|
|
396
|
+
"./lib/filterObject.js",
|
|
397
|
+
"./lib/filterObject.d.ts",
|
|
398
|
+
"./lib/filterObject.cjs",
|
|
399
|
+
"./lib/filterObject.d.cts",
|
|
400
|
+
"./lib/filterSet.js",
|
|
401
|
+
"./lib/filterSet.d.ts",
|
|
402
|
+
"./lib/filterSet.cjs",
|
|
403
|
+
"./lib/filterSet.d.cts",
|
|
404
|
+
"./lib/forEachArray.js",
|
|
405
|
+
"./lib/forEachArray.d.ts",
|
|
406
|
+
"./lib/forEachArray.cjs",
|
|
407
|
+
"./lib/forEachArray.d.cts",
|
|
408
|
+
"./lib/forEachIterable.js",
|
|
409
|
+
"./lib/forEachIterable.d.ts",
|
|
410
|
+
"./lib/forEachIterable.cjs",
|
|
411
|
+
"./lib/forEachIterable.d.cts",
|
|
412
|
+
"./lib/forEachIterableEntries.js",
|
|
413
|
+
"./lib/forEachIterableEntries.d.ts",
|
|
414
|
+
"./lib/forEachIterableEntries.cjs",
|
|
415
|
+
"./lib/forEachIterableEntries.d.cts",
|
|
416
|
+
"./lib/forEachIterableKeys.js",
|
|
417
|
+
"./lib/forEachIterableKeys.d.ts",
|
|
418
|
+
"./lib/forEachIterableKeys.cjs",
|
|
419
|
+
"./lib/forEachIterableKeys.d.cts",
|
|
420
|
+
"./lib/forEachIterableValues.js",
|
|
421
|
+
"./lib/forEachIterableValues.d.ts",
|
|
422
|
+
"./lib/forEachIterableValues.cjs",
|
|
423
|
+
"./lib/forEachIterableValues.d.cts",
|
|
424
|
+
"./lib/forEachMap.js",
|
|
425
|
+
"./lib/forEachMap.d.ts",
|
|
426
|
+
"./lib/forEachMap.cjs",
|
|
427
|
+
"./lib/forEachMap.d.cts",
|
|
428
|
+
"./lib/forEachObject.js",
|
|
429
|
+
"./lib/forEachObject.d.ts",
|
|
430
|
+
"./lib/forEachObject.cjs",
|
|
431
|
+
"./lib/forEachObject.d.cts",
|
|
432
|
+
"./lib/forEachSet.js",
|
|
433
|
+
"./lib/forEachSet.d.ts",
|
|
434
|
+
"./lib/forEachSet.cjs",
|
|
435
|
+
"./lib/forEachSet.d.cts",
|
|
436
|
+
"./lib/mapArray.js",
|
|
437
|
+
"./lib/mapArray.d.ts",
|
|
438
|
+
"./lib/mapArray.cjs",
|
|
439
|
+
"./lib/mapArray.d.cts",
|
|
440
|
+
"./lib/mapIterable.js",
|
|
441
|
+
"./lib/mapIterable.d.ts",
|
|
442
|
+
"./lib/mapIterable.cjs",
|
|
443
|
+
"./lib/mapIterable.d.cts",
|
|
444
|
+
"./lib/mapIterableEntries.js",
|
|
445
|
+
"./lib/mapIterableEntries.d.ts",
|
|
446
|
+
"./lib/mapIterableEntries.cjs",
|
|
447
|
+
"./lib/mapIterableEntries.d.cts",
|
|
448
|
+
"./lib/mapIterableKeys.js",
|
|
449
|
+
"./lib/mapIterableKeys.d.ts",
|
|
450
|
+
"./lib/mapIterableKeys.cjs",
|
|
451
|
+
"./lib/mapIterableKeys.d.cts",
|
|
452
|
+
"./lib/mapIterableValues.js",
|
|
453
|
+
"./lib/mapIterableValues.d.ts",
|
|
454
|
+
"./lib/mapIterableValues.cjs",
|
|
455
|
+
"./lib/mapIterableValues.d.cts",
|
|
456
|
+
"./lib/mapMap.js",
|
|
457
|
+
"./lib/mapMap.d.ts",
|
|
458
|
+
"./lib/mapMap.cjs",
|
|
459
|
+
"./lib/mapMap.d.cts",
|
|
460
|
+
"./lib/mapObject.js",
|
|
461
|
+
"./lib/mapObject.d.ts",
|
|
462
|
+
"./lib/mapObject.cjs",
|
|
463
|
+
"./lib/mapObject.d.cts",
|
|
464
|
+
"./lib/mapSet.js",
|
|
465
|
+
"./lib/mapSet.d.ts",
|
|
466
|
+
"./lib/mapSet.cjs",
|
|
467
|
+
"./lib/mapSet.d.cts",
|
|
468
|
+
"./lib/reduceArray.js",
|
|
469
|
+
"./lib/reduceArray.d.ts",
|
|
470
|
+
"./lib/reduceArray.cjs",
|
|
471
|
+
"./lib/reduceArray.d.cts",
|
|
472
|
+
"./lib/reduceIterable.js",
|
|
473
|
+
"./lib/reduceIterable.d.ts",
|
|
474
|
+
"./lib/reduceIterable.cjs",
|
|
475
|
+
"./lib/reduceIterable.d.cts",
|
|
476
|
+
"./lib/reduceIterableEntries.js",
|
|
477
|
+
"./lib/reduceIterableEntries.d.ts",
|
|
478
|
+
"./lib/reduceIterableEntries.cjs",
|
|
479
|
+
"./lib/reduceIterableEntries.d.cts",
|
|
480
|
+
"./lib/reduceIterableKeys.js",
|
|
481
|
+
"./lib/reduceIterableKeys.d.ts",
|
|
482
|
+
"./lib/reduceIterableKeys.cjs",
|
|
483
|
+
"./lib/reduceIterableKeys.d.cts",
|
|
484
|
+
"./lib/reduceIterableValues.js",
|
|
485
|
+
"./lib/reduceIterableValues.d.ts",
|
|
486
|
+
"./lib/reduceIterableValues.cjs",
|
|
487
|
+
"./lib/reduceIterableValues.d.cts",
|
|
488
|
+
"./lib/reduceMap.js",
|
|
489
|
+
"./lib/reduceMap.d.ts",
|
|
490
|
+
"./lib/reduceMap.cjs",
|
|
491
|
+
"./lib/reduceMap.d.cts",
|
|
492
|
+
"./lib/reduceObject.js",
|
|
493
|
+
"./lib/reduceObject.d.ts",
|
|
494
|
+
"./lib/reduceObject.cjs",
|
|
495
|
+
"./lib/reduceObject.d.cts",
|
|
496
|
+
"./lib/reduceSet.js",
|
|
497
|
+
"./lib/reduceSet.d.ts",
|
|
498
|
+
"./lib/reduceSet.cjs",
|
|
499
|
+
"./lib/reduceSet.d.cts",
|
|
500
|
+
"./lib/toObjectIterable.js",
|
|
501
|
+
"./lib/toObjectIterable.d.ts",
|
|
502
|
+
"./lib/toObjectIterable.cjs",
|
|
503
|
+
"./lib/toObjectIterable.d.cts"
|
|
504
|
+
],
|
|
29
505
|
"repository": {
|
|
30
506
|
"type": "git",
|
|
31
507
|
"url": "git+https://github.com/bemoje/mono.git",
|
|
32
508
|
"directory": "libs/iter"
|
|
33
|
-
}
|
|
509
|
+
},
|
|
510
|
+
"author": {
|
|
511
|
+
"name": "Benjamin Møller Jensen",
|
|
512
|
+
"email": "bemoje@bemoje.net",
|
|
513
|
+
"url": "https://github.com/bemoje/"
|
|
514
|
+
},
|
|
515
|
+
"license": "MIT"
|
|
34
516
|
}
|
package/index.d.ts
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Filter a `Map` (or `ReadonlyMap`). Predicate receives `(value, key)`. Returns a new `Map`.
|
|
3
|
-
*/
|
|
4
|
-
declare function filter<K, V>(map: ReadonlyMap<K, V>, predicate: (value: V, key: K) => boolean): Map<K, V>;
|
|
5
|
-
/** Filter a `Set` (or `ReadonlySet`). Predicate receives `(value)`. Returns a new `Set`. */
|
|
6
|
-
declare function filter<V>(set: ReadonlySet<V>, predicate: (value: V) => boolean): Set<V>;
|
|
7
|
-
/** Filter an array. Predicate receives `(value, index)`. Returns a new array. */
|
|
8
|
-
declare function filter<V>(array: readonly V[], predicate: (value: V, index: number) => boolean): V[];
|
|
9
|
-
/** Filter a plain object. Predicate receives `(value, key)`. Returns a new partial object. */
|
|
10
|
-
declare function filter<K extends string, V>(object: Record<K, V>, predicate: (value: V, key: K) => boolean): Partial<Record<K, V>>;
|
|
11
|
-
/** Filter any `Iterable`. Predicate receives `(value)`. Returns a new array. */
|
|
12
|
-
declare function filter<V>(iterable: Iterable<V>, predicate: (value: V) => boolean): V[];
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Transform values of an iterable.
|
|
16
|
-
*/
|
|
17
|
-
declare function filterIterable<T>(set: Iterable<T>, predicate: (value: T) => boolean): Iterable<T>;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Filter map entries based on a predicate function.
|
|
21
|
-
*/
|
|
22
|
-
declare function filterIterableEntries<K, V>(mapLike: Iterable<[K, V]>, predicate: (value: V, key: K) => boolean): Iterable<[K, V]>;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Iterate a `Map` (or `ReadonlyMap`). Callback receives `(value, key)`.
|
|
26
|
-
*/
|
|
27
|
-
declare function forEach<K, V>(map: ReadonlyMap<K, V>, callback: (value: V, key: K) => void): void;
|
|
28
|
-
/** Iterate a `Set` (or `ReadonlySet`). Callback receives `(value)`. */
|
|
29
|
-
declare function forEach<V>(set: ReadonlySet<V>, callback: (value: V) => void): void;
|
|
30
|
-
/** Iterate an array. Callback receives `(value, index)`. */
|
|
31
|
-
declare function forEach<V>(array: readonly V[], callback: (value: V, index: number) => void): void;
|
|
32
|
-
/** Iterate a plain object. Callback receives `(value, key)`. */
|
|
33
|
-
declare function forEach<K extends string, V>(object: Record<K, V>, callback: (value: V, key: K) => void): void;
|
|
34
|
-
/** Iterate any `Iterable`. Callback receives `(value)`. */
|
|
35
|
-
declare function forEach<V>(iterable: Iterable<V>, callback: (value: V) => void): void;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Iterate over values of an iterable, executing a callback for each.
|
|
39
|
-
*/
|
|
40
|
-
declare function forEachIterable<T>(set: Iterable<T>, callback: (value: T) => unknown): void;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Execute a callback function for each entry in a map-like iterable.
|
|
44
|
-
*/
|
|
45
|
-
declare function forEachIterableEntries<K, V>(mapLike: Iterable<[K, V]>, callback: (value: V, key: K) => void): void;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Map a `Map` (or `ReadonlyMap`). Callback receives `(value, key)`. Returns a new `Map`.
|
|
49
|
-
*/
|
|
50
|
-
declare function map<K, V, R>(map: ReadonlyMap<K, V>, transform: (value: V, key: K) => R): Map<K, R>;
|
|
51
|
-
/** Map a `Set` (or `ReadonlySet`). Callback receives `(value)`. Returns a new `Set`. */
|
|
52
|
-
declare function map<V, R>(set: ReadonlySet<V>, transform: (value: V) => R): Set<R>;
|
|
53
|
-
/** Map an array. Callback receives `(value, index)`. Returns a new array. */
|
|
54
|
-
declare function map<V, R>(array: readonly V[], transform: (value: V, index: number) => R): R[];
|
|
55
|
-
/** Map a plain object. Callback receives `(value, key)`. Returns a new object. */
|
|
56
|
-
declare function map<K extends string, V, R>(object: Record<K, V>, transform: (value: V, key: K) => R): Record<K, R>;
|
|
57
|
-
/** Map any `Iterable`. Callback receives `(value)`. Returns a new array. */
|
|
58
|
-
declare function map<V, R>(iterable: Iterable<V>, transform: (value: V) => R): R[];
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Transform values of an iterable.
|
|
62
|
-
*/
|
|
63
|
-
declare function mapIterable<T, R>(set: Iterable<T>, transform: (value: T) => R): Iterable<R>;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Transform both keys and values of map entries.
|
|
67
|
-
*/
|
|
68
|
-
declare function mapIterableEntries<K, V, U, W>(mapLike: Iterable<[K, V]>, transform: (value: V, key: K) => [U, W]): Iterable<[U, W]>;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Transform map keys while preserving values.
|
|
72
|
-
*/
|
|
73
|
-
declare function mapIterableKeys<K, V, U>(mapLike: Iterable<[K, V]>, transform: (key: K, value: V) => U): Iterable<[U, V]>;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Transform map values while preserving keys.
|
|
77
|
-
*/
|
|
78
|
-
declare function mapIterableValues<K, V, U>(mapLike: Iterable<[K, V]>, transform: (value: V, key: K) => U): Iterable<[K, U]>;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Reduce a `Map` (or `ReadonlyMap`). Callback receives `(accumulator, value, key)`.
|
|
82
|
-
*/
|
|
83
|
-
declare function reduce<K, V, T>(map: ReadonlyMap<K, V>, reducer: (accumulator: T, value: V, key: K) => T, initialValue: T): T;
|
|
84
|
-
/** Reduce a `Set` (or `ReadonlySet`). Callback receives `(accumulator, value)`. */
|
|
85
|
-
declare function reduce<V, T>(set: ReadonlySet<V>, reducer: (accumulator: T, value: V) => T, initialValue: T): T;
|
|
86
|
-
/** Reduce an array. Callback receives `(accumulator, value, index)`. */
|
|
87
|
-
declare function reduce<V, T>(array: readonly V[], reducer: (accumulator: T, value: V, index: number) => T, initialValue: T): T;
|
|
88
|
-
/** Reduce a plain object. Callback receives `(accumulator, value, key)`. */
|
|
89
|
-
declare function reduce<K extends string, V, T>(object: Record<K, V>, reducer: (accumulator: T, value: V, key: K) => T, initialValue: T): T;
|
|
90
|
-
/** Reduce any `Iterable`. Callback receives `(accumulator, value)`. */
|
|
91
|
-
declare function reduce<V, T>(iterable: Iterable<V>, reducer: (accumulator: T, value: V) => T, initialValue: T): T;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Reduce any iterable to a single value.
|
|
95
|
-
*/
|
|
96
|
-
declare function reduceIterable<V, T>(iterable: Iterable<V>, reducer: (accumulator: T, value: V) => T, initialValue: T): T;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Reduce a map-like iterable to a single value.
|
|
100
|
-
*/
|
|
101
|
-
declare function reduceIterableEntries<K, V, T>(mapLike: Iterable<[K, V]>, reducer: (accumulator: T, value: V, key: K) => T, initialValue: T): T;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Convert a map-like iterable to a regular object.
|
|
105
|
-
*/
|
|
106
|
-
declare function toObjectIterable<K extends string, V>(mapLike: Iterable<[K, V]>): Record<K, V>;
|
|
107
|
-
declare function toObjectIterable<K, V>(mapLike: Iterable<[K, V]>): Record<Extract<K, string> | string, V>;
|
|
108
|
-
|
|
109
|
-
export { filter, filterIterable, filterIterableEntries, forEach, forEachIterable, forEachIterableEntries, map, mapIterable, mapIterableEntries, mapIterableKeys, mapIterableValues, reduce, reduceIterable, reduceIterableEntries, toObjectIterable };
|