es-toolkit 1.10.1-dev.223 → 1.10.1-dev.226
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/array/dropRightWhile.js +6 -14
- package/dist/array/dropRightWhile.js.map +1 -1
- package/dist/array/dropRightWhile.mjs +1 -2
- package/dist/array/index.js +10 -7
- package/dist/array/index.js.map +1 -1
- package/dist/array/index.mjs +32 -32
- package/dist/chunk-M7SBBYV2.mjs +14 -0
- package/dist/chunk-M7SBBYV2.mjs.map +1 -0
- package/dist/compat/index.js +10 -7
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/index.mjs +56 -56
- package/dist/function/index.mjs +6 -6
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -56
- package/package.json +1 -1
- package/dist/chunk-JE6JKZU3.mjs +0 -15
- package/dist/chunk-JE6JKZU3.mjs.map +0 -1
package/dist/compat/index.mjs
CHANGED
|
@@ -74,6 +74,22 @@ import {
|
|
|
74
74
|
import {
|
|
75
75
|
sum
|
|
76
76
|
} from "../chunk-2SLTL4KL.mjs";
|
|
77
|
+
import "../chunk-236H5JZJ.mjs";
|
|
78
|
+
import {
|
|
79
|
+
debounce
|
|
80
|
+
} from "../chunk-3IP4JVLL.mjs";
|
|
81
|
+
import {
|
|
82
|
+
negate
|
|
83
|
+
} from "../chunk-BOOQBJN2.mjs";
|
|
84
|
+
import {
|
|
85
|
+
noop
|
|
86
|
+
} from "../chunk-LKXCOLNY.mjs";
|
|
87
|
+
import {
|
|
88
|
+
once
|
|
89
|
+
} from "../chunk-CMBC4MXG.mjs";
|
|
90
|
+
import {
|
|
91
|
+
throttle
|
|
92
|
+
} from "../chunk-QOJGMVVR.mjs";
|
|
77
93
|
import {
|
|
78
94
|
clamp
|
|
79
95
|
} from "../chunk-MLCL773E.mjs";
|
|
@@ -81,6 +97,12 @@ import {
|
|
|
81
97
|
inRange
|
|
82
98
|
} from "../chunk-BH6HLGBA.mjs";
|
|
83
99
|
import "../chunk-DDH7K4QM.mjs";
|
|
100
|
+
import {
|
|
101
|
+
unzipWith
|
|
102
|
+
} from "../chunk-IFNXROZR.mjs";
|
|
103
|
+
import {
|
|
104
|
+
without
|
|
105
|
+
} from "../chunk-PYEYV7BY.mjs";
|
|
84
106
|
import {
|
|
85
107
|
xor
|
|
86
108
|
} from "../chunk-L7FQX5MN.mjs";
|
|
@@ -99,12 +121,21 @@ import {
|
|
|
99
121
|
import {
|
|
100
122
|
zipWith
|
|
101
123
|
} from "../chunk-4KYXHZ4R.mjs";
|
|
124
|
+
import {
|
|
125
|
+
toFilled
|
|
126
|
+
} from "../chunk-OP4OAKQJ.mjs";
|
|
127
|
+
import {
|
|
128
|
+
union
|
|
129
|
+
} from "../chunk-R6QA7PLZ.mjs";
|
|
102
130
|
import {
|
|
103
131
|
unionBy
|
|
104
132
|
} from "../chunk-NFS7RWWE.mjs";
|
|
105
133
|
import {
|
|
106
134
|
unionWith
|
|
107
135
|
} from "../chunk-2ZCITDMK.mjs";
|
|
136
|
+
import {
|
|
137
|
+
uniq
|
|
138
|
+
} from "../chunk-DVK2N4KC.mjs";
|
|
108
139
|
import {
|
|
109
140
|
uniqBy
|
|
110
141
|
} from "../chunk-OXAZEEGP.mjs";
|
|
@@ -115,11 +146,17 @@ import {
|
|
|
115
146
|
unzip
|
|
116
147
|
} from "../chunk-UYZKMBDO.mjs";
|
|
117
148
|
import {
|
|
118
|
-
|
|
119
|
-
} from "../chunk-
|
|
149
|
+
sample
|
|
150
|
+
} from "../chunk-2KNLZB7V.mjs";
|
|
120
151
|
import {
|
|
121
|
-
|
|
122
|
-
} from "../chunk-
|
|
152
|
+
sampleSize
|
|
153
|
+
} from "../chunk-EHSKB6DF.mjs";
|
|
154
|
+
import {
|
|
155
|
+
randomInt
|
|
156
|
+
} from "../chunk-GIWAOOFY.mjs";
|
|
157
|
+
import {
|
|
158
|
+
random
|
|
159
|
+
} from "../chunk-SYWMYQYJ.mjs";
|
|
123
160
|
import {
|
|
124
161
|
shuffle
|
|
125
162
|
} from "../chunk-G7UQ5PUR.mjs";
|
|
@@ -139,14 +176,11 @@ import {
|
|
|
139
176
|
takeWhile
|
|
140
177
|
} from "../chunk-2IXFGSUA.mjs";
|
|
141
178
|
import {
|
|
142
|
-
|
|
143
|
-
} from "../chunk-
|
|
144
|
-
import {
|
|
145
|
-
union
|
|
146
|
-
} from "../chunk-R6QA7PLZ.mjs";
|
|
179
|
+
intersectionBy
|
|
180
|
+
} from "../chunk-O6UXZR3U.mjs";
|
|
147
181
|
import {
|
|
148
|
-
|
|
149
|
-
} from "../chunk-
|
|
182
|
+
intersectionWith
|
|
183
|
+
} from "../chunk-XI7KRD2C.mjs";
|
|
150
184
|
import {
|
|
151
185
|
keyBy
|
|
152
186
|
} from "../chunk-AJKZMN2V.mjs";
|
|
@@ -166,17 +200,8 @@ import {
|
|
|
166
200
|
partition
|
|
167
201
|
} from "../chunk-DN3NOZ3H.mjs";
|
|
168
202
|
import {
|
|
169
|
-
|
|
170
|
-
} from "../chunk-
|
|
171
|
-
import {
|
|
172
|
-
sampleSize
|
|
173
|
-
} from "../chunk-EHSKB6DF.mjs";
|
|
174
|
-
import {
|
|
175
|
-
randomInt
|
|
176
|
-
} from "../chunk-GIWAOOFY.mjs";
|
|
177
|
-
import {
|
|
178
|
-
random
|
|
179
|
-
} from "../chunk-SYWMYQYJ.mjs";
|
|
203
|
+
flattenDeep
|
|
204
|
+
} from "../chunk-ML727RRJ.mjs";
|
|
180
205
|
import {
|
|
181
206
|
forEachRight
|
|
182
207
|
} from "../chunk-IEA53J7P.mjs";
|
|
@@ -193,11 +218,11 @@ import {
|
|
|
193
218
|
intersection
|
|
194
219
|
} from "../chunk-FVVSE2F2.mjs";
|
|
195
220
|
import {
|
|
196
|
-
|
|
197
|
-
} from "../chunk-
|
|
221
|
+
differenceBy
|
|
222
|
+
} from "../chunk-LVWX5B43.mjs";
|
|
198
223
|
import {
|
|
199
|
-
|
|
200
|
-
} from "../chunk-
|
|
224
|
+
differenceWith
|
|
225
|
+
} from "../chunk-6NVQAHXP.mjs";
|
|
201
226
|
import {
|
|
202
227
|
drop
|
|
203
228
|
} from "../chunk-S3CORED5.mjs";
|
|
@@ -206,7 +231,7 @@ import {
|
|
|
206
231
|
} from "../chunk-JEKUA56R.mjs";
|
|
207
232
|
import {
|
|
208
233
|
dropRightWhile
|
|
209
|
-
} from "../chunk-
|
|
234
|
+
} from "../chunk-M7SBBYV2.mjs";
|
|
210
235
|
import {
|
|
211
236
|
dropWhile
|
|
212
237
|
} from "../chunk-LJ2C6MVP.mjs";
|
|
@@ -216,12 +241,13 @@ import {
|
|
|
216
241
|
import {
|
|
217
242
|
flatMap
|
|
218
243
|
} from "../chunk-KBXHURLW.mjs";
|
|
219
|
-
import {
|
|
220
|
-
flattenDeep
|
|
221
|
-
} from "../chunk-ML727RRJ.mjs";
|
|
222
244
|
import {
|
|
223
245
|
flatten
|
|
224
246
|
} from "../chunk-33MSBDC6.mjs";
|
|
247
|
+
import "../chunk-FZEZH22H.mjs";
|
|
248
|
+
import {
|
|
249
|
+
AbortError
|
|
250
|
+
} from "../chunk-DXB7EZUQ.mjs";
|
|
225
251
|
import {
|
|
226
252
|
chunk
|
|
227
253
|
} from "../chunk-E6C5EZQA.mjs";
|
|
@@ -234,32 +260,6 @@ import {
|
|
|
234
260
|
import {
|
|
235
261
|
difference
|
|
236
262
|
} from "../chunk-JPUKH67K.mjs";
|
|
237
|
-
import {
|
|
238
|
-
differenceBy
|
|
239
|
-
} from "../chunk-LVWX5B43.mjs";
|
|
240
|
-
import {
|
|
241
|
-
differenceWith
|
|
242
|
-
} from "../chunk-6NVQAHXP.mjs";
|
|
243
|
-
import "../chunk-FZEZH22H.mjs";
|
|
244
|
-
import {
|
|
245
|
-
AbortError
|
|
246
|
-
} from "../chunk-DXB7EZUQ.mjs";
|
|
247
|
-
import "../chunk-236H5JZJ.mjs";
|
|
248
|
-
import {
|
|
249
|
-
once
|
|
250
|
-
} from "../chunk-CMBC4MXG.mjs";
|
|
251
|
-
import {
|
|
252
|
-
throttle
|
|
253
|
-
} from "../chunk-QOJGMVVR.mjs";
|
|
254
|
-
import {
|
|
255
|
-
debounce
|
|
256
|
-
} from "../chunk-3IP4JVLL.mjs";
|
|
257
|
-
import {
|
|
258
|
-
negate
|
|
259
|
-
} from "../chunk-BOOQBJN2.mjs";
|
|
260
|
-
import {
|
|
261
|
-
noop
|
|
262
|
-
} from "../chunk-LKXCOLNY.mjs";
|
|
263
263
|
import "../chunk-2MM5EJJX.mjs";
|
|
264
264
|
|
|
265
265
|
// src/compat/array/chunk.ts
|
package/dist/function/index.mjs
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import "../chunk-236H5JZJ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
once
|
|
4
|
-
} from "../chunk-CMBC4MXG.mjs";
|
|
5
|
-
import {
|
|
6
|
-
throttle
|
|
7
|
-
} from "../chunk-QOJGMVVR.mjs";
|
|
8
2
|
import {
|
|
9
3
|
debounce
|
|
10
4
|
} from "../chunk-3IP4JVLL.mjs";
|
|
@@ -14,6 +8,12 @@ import {
|
|
|
14
8
|
import {
|
|
15
9
|
noop
|
|
16
10
|
} from "../chunk-LKXCOLNY.mjs";
|
|
11
|
+
import {
|
|
12
|
+
once
|
|
13
|
+
} from "../chunk-CMBC4MXG.mjs";
|
|
14
|
+
import {
|
|
15
|
+
throttle
|
|
16
|
+
} from "../chunk-QOJGMVVR.mjs";
|
|
17
17
|
import "../chunk-2MM5EJJX.mjs";
|
|
18
18
|
export {
|
|
19
19
|
debounce,
|
package/dist/index.js
CHANGED
|
@@ -191,6 +191,16 @@ function dropRight(arr, itemsCount) {
|
|
|
191
191
|
return arr.slice(0, -itemsCount);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
+
// src/array/dropRightWhile.ts
|
|
195
|
+
function dropRightWhile(arr, canContinueDropping) {
|
|
196
|
+
for (let i = arr.length - 1; i >= 0; i--) {
|
|
197
|
+
if (!canContinueDropping(arr[i])) {
|
|
198
|
+
return arr.slice(0, i + 1);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return [];
|
|
202
|
+
}
|
|
203
|
+
|
|
194
204
|
// src/array/dropWhile.ts
|
|
195
205
|
function dropWhile(arr, canContinueDropping) {
|
|
196
206
|
const dropEndIndex = arr.findIndex((item) => !canContinueDropping(item));
|
|
@@ -200,13 +210,6 @@ function dropWhile(arr, canContinueDropping) {
|
|
|
200
210
|
return arr.slice(dropEndIndex);
|
|
201
211
|
}
|
|
202
212
|
|
|
203
|
-
// src/array/dropRightWhile.ts
|
|
204
|
-
function dropRightWhile(arr, canContinueDropping) {
|
|
205
|
-
const reversed = arr.slice().reverse();
|
|
206
|
-
const dropped = dropWhile(reversed, canContinueDropping);
|
|
207
|
-
return dropped.slice().reverse();
|
|
208
|
-
}
|
|
209
|
-
|
|
210
213
|
// src/array/fill.ts
|
|
211
214
|
function fill(arr, value, start = 0, end = arr.length) {
|
|
212
215
|
start = Math.max(start, 0);
|