es-toolkit 1.13.1-dev.318 → 1.13.1-dev.320
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/index.mjs +60 -60
- package/dist/browser.js +11 -0
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +33 -32
- package/dist/browser.mjs.map +1 -1
- package/dist/chunk-STL6TD3L.mjs +1 -0
- package/dist/chunk-SXFMQQ6F.mjs +9 -0
- package/dist/chunk-SXFMQQ6F.mjs.map +1 -0
- package/dist/{chunk-36ZJSTNA.mjs → chunk-YNJH6GEG.mjs} +83 -73
- package/dist/chunk-YNJH6GEG.mjs.map +1 -0
- package/dist/compat/index.d.mts +19 -1
- package/dist/compat/index.d.ts +19 -1
- package/dist/compat/index.js +12 -0
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/index.mjs +77 -74
- package/dist/error/index.mjs +3 -3
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +78 -74
- package/dist/predicate/index.d.mts +1 -0
- package/dist/predicate/index.d.ts +1 -0
- package/dist/predicate/index.js +7 -0
- package/dist/predicate/index.js.map +1 -1
- package/dist/predicate/index.mjs +5 -1
- package/dist/predicate/isTypedArray.d.mts +19 -0
- package/dist/predicate/isTypedArray.d.ts +19 -0
- package/dist/predicate/isTypedArray.js +33 -0
- package/dist/predicate/isTypedArray.js.map +1 -0
- package/dist/predicate/isTypedArray.mjs +8 -0
- package/dist/predicate/isTypedArray.mjs.map +1 -0
- package/dist/promise/index.mjs +1 -1
- package/dist/promise/timeout.mjs +1 -1
- package/dist/promise/withTimeout.mjs +1 -1
- package/dist/string/index.mjs +3 -3
- package/package.json +1 -1
- package/umd/browser.global.js +1 -1
- package/dist/chunk-36ZJSTNA.mjs.map +0 -1
- package/dist/chunk-U4JWMVQK.mjs +0 -1
- /package/dist/{chunk-U4JWMVQK.mjs.map → chunk-STL6TD3L.mjs.map} +0 -0
package/dist/compat/index.mjs
CHANGED
|
@@ -7,19 +7,26 @@ import {
|
|
|
7
7
|
get,
|
|
8
8
|
isArray,
|
|
9
9
|
isPlainObject,
|
|
10
|
+
isTypedArray,
|
|
10
11
|
max,
|
|
11
12
|
min,
|
|
12
13
|
set,
|
|
13
14
|
startsWith,
|
|
14
15
|
zipObjectDeep
|
|
15
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-YNJH6GEG.mjs";
|
|
16
17
|
import "../chunk-NKLIE2OI.mjs";
|
|
17
18
|
import "../chunk-4OIZM4HS.mjs";
|
|
18
19
|
import {
|
|
19
20
|
withTimeout
|
|
20
21
|
} from "../chunk-IIDZ3KAJ.mjs";
|
|
21
22
|
import "../chunk-CVVZHOJX.mjs";
|
|
23
|
+
import {
|
|
24
|
+
delay
|
|
25
|
+
} from "../chunk-O64NE2P4.mjs";
|
|
22
26
|
import "../chunk-XT74R35S.mjs";
|
|
27
|
+
import {
|
|
28
|
+
lowerCase
|
|
29
|
+
} from "../chunk-5IKVJGHO.mjs";
|
|
23
30
|
import {
|
|
24
31
|
snakeCase
|
|
25
32
|
} from "../chunk-F3WCQQET.mjs";
|
|
@@ -35,14 +42,8 @@ import {
|
|
|
35
42
|
import {
|
|
36
43
|
kebabCase
|
|
37
44
|
} from "../chunk-EYYZQFOP.mjs";
|
|
38
|
-
import {
|
|
39
|
-
lowerCase
|
|
40
|
-
} from "../chunk-5IKVJGHO.mjs";
|
|
41
45
|
import "../chunk-WVQ7YVRK.mjs";
|
|
42
|
-
import
|
|
43
|
-
delay
|
|
44
|
-
} from "../chunk-O64NE2P4.mjs";
|
|
45
|
-
import "../chunk-U4JWMVQK.mjs";
|
|
46
|
+
import "../chunk-STL6TD3L.mjs";
|
|
46
47
|
import {
|
|
47
48
|
isFunction
|
|
48
49
|
} from "../chunk-74CREQXW.mjs";
|
|
@@ -55,6 +56,7 @@ import {
|
|
|
55
56
|
import {
|
|
56
57
|
isNull
|
|
57
58
|
} from "../chunk-AIRSKN47.mjs";
|
|
59
|
+
import "../chunk-SXFMQQ6F.mjs";
|
|
58
60
|
import {
|
|
59
61
|
isUndefined
|
|
60
62
|
} from "../chunk-VH2PV426.mjs";
|
|
@@ -118,6 +120,10 @@ import {
|
|
|
118
120
|
import {
|
|
119
121
|
sum
|
|
120
122
|
} from "../chunk-2SLTL4KL.mjs";
|
|
123
|
+
import "../chunk-F47GLYUU.mjs";
|
|
124
|
+
import {
|
|
125
|
+
TimeoutError
|
|
126
|
+
} from "../chunk-KIOYQRMQ.mjs";
|
|
121
127
|
import "../chunk-ZA2XI3OV.mjs";
|
|
122
128
|
import {
|
|
123
129
|
throttle
|
|
@@ -137,13 +143,40 @@ import {
|
|
|
137
143
|
import {
|
|
138
144
|
once
|
|
139
145
|
} from "../chunk-CMBC4MXG.mjs";
|
|
146
|
+
import {
|
|
147
|
+
AbortError
|
|
148
|
+
} from "../chunk-DXB7EZUQ.mjs";
|
|
140
149
|
import "../chunk-DDH7K4QM.mjs";
|
|
150
|
+
import {
|
|
151
|
+
xor
|
|
152
|
+
} from "../chunk-L7FQX5MN.mjs";
|
|
153
|
+
import {
|
|
154
|
+
xorBy
|
|
155
|
+
} from "../chunk-Q47NGNXT.mjs";
|
|
156
|
+
import {
|
|
157
|
+
xorWith
|
|
158
|
+
} from "../chunk-QRSJBBFY.mjs";
|
|
159
|
+
import {
|
|
160
|
+
zip
|
|
161
|
+
} from "../chunk-OLORW442.mjs";
|
|
141
162
|
import {
|
|
142
163
|
zipObject
|
|
143
164
|
} from "../chunk-6GWEY5EL.mjs";
|
|
144
165
|
import {
|
|
145
166
|
zipWith
|
|
146
167
|
} from "../chunk-4KYXHZ4R.mjs";
|
|
168
|
+
import {
|
|
169
|
+
unionBy
|
|
170
|
+
} from "../chunk-NFS7RWWE.mjs";
|
|
171
|
+
import {
|
|
172
|
+
unionWith
|
|
173
|
+
} from "../chunk-2ZCITDMK.mjs";
|
|
174
|
+
import {
|
|
175
|
+
uniqBy
|
|
176
|
+
} from "../chunk-B4COTK4K.mjs";
|
|
177
|
+
import {
|
|
178
|
+
uniqWith
|
|
179
|
+
} from "../chunk-237HGSZS.mjs";
|
|
147
180
|
import {
|
|
148
181
|
unzip
|
|
149
182
|
} from "../chunk-UYZKMBDO.mjs";
|
|
@@ -154,17 +187,17 @@ import {
|
|
|
154
187
|
without
|
|
155
188
|
} from "../chunk-PYEYV7BY.mjs";
|
|
156
189
|
import {
|
|
157
|
-
|
|
158
|
-
} from "../chunk-
|
|
190
|
+
shuffle
|
|
191
|
+
} from "../chunk-G7UQ5PUR.mjs";
|
|
159
192
|
import {
|
|
160
|
-
|
|
161
|
-
} from "../chunk-
|
|
193
|
+
tail
|
|
194
|
+
} from "../chunk-TJ4Z5I7M.mjs";
|
|
162
195
|
import {
|
|
163
|
-
|
|
164
|
-
} from "../chunk-
|
|
196
|
+
take
|
|
197
|
+
} from "../chunk-ME352XO7.mjs";
|
|
165
198
|
import {
|
|
166
|
-
|
|
167
|
-
} from "../chunk-
|
|
199
|
+
takeRight
|
|
200
|
+
} from "../chunk-N3QYJX4T.mjs";
|
|
168
201
|
import {
|
|
169
202
|
takeRightWhile
|
|
170
203
|
} from "../chunk-NTLX2MPV.mjs";
|
|
@@ -178,20 +211,20 @@ import {
|
|
|
178
211
|
union
|
|
179
212
|
} from "../chunk-R6QA7PLZ.mjs";
|
|
180
213
|
import {
|
|
181
|
-
|
|
182
|
-
} from "../chunk-
|
|
214
|
+
uniq
|
|
215
|
+
} from "../chunk-DVK2N4KC.mjs";
|
|
183
216
|
import {
|
|
184
|
-
|
|
185
|
-
} from "../chunk-
|
|
217
|
+
keyBy
|
|
218
|
+
} from "../chunk-AJKZMN2V.mjs";
|
|
186
219
|
import {
|
|
187
|
-
|
|
188
|
-
} from "../chunk-
|
|
220
|
+
last
|
|
221
|
+
} from "../chunk-KPBQ7OUY.mjs";
|
|
189
222
|
import {
|
|
190
|
-
|
|
191
|
-
} from "../chunk-
|
|
223
|
+
maxBy
|
|
224
|
+
} from "../chunk-OOKNBU4V.mjs";
|
|
192
225
|
import {
|
|
193
|
-
|
|
194
|
-
} from "../chunk-
|
|
226
|
+
minBy
|
|
227
|
+
} from "../chunk-IJD7FE2Z.mjs";
|
|
195
228
|
import {
|
|
196
229
|
orderBy
|
|
197
230
|
} from "../chunk-7B7W36UP.mjs";
|
|
@@ -211,17 +244,14 @@ import {
|
|
|
211
244
|
random
|
|
212
245
|
} from "../chunk-SYWMYQYJ.mjs";
|
|
213
246
|
import {
|
|
214
|
-
|
|
215
|
-
} from "../chunk-
|
|
216
|
-
import {
|
|
217
|
-
tail
|
|
218
|
-
} from "../chunk-TJ4Z5I7M.mjs";
|
|
247
|
+
forEachRight
|
|
248
|
+
} from "../chunk-IEA53J7P.mjs";
|
|
219
249
|
import {
|
|
220
|
-
|
|
221
|
-
} from "../chunk-
|
|
250
|
+
groupBy
|
|
251
|
+
} from "../chunk-E6E4RZLN.mjs";
|
|
222
252
|
import {
|
|
223
|
-
|
|
224
|
-
} from "../chunk-
|
|
253
|
+
head
|
|
254
|
+
} from "../chunk-HM2JT2RX.mjs";
|
|
225
255
|
import {
|
|
226
256
|
initial
|
|
227
257
|
} from "../chunk-XPSOKBRZ.mjs";
|
|
@@ -235,17 +265,17 @@ import {
|
|
|
235
265
|
intersectionWith
|
|
236
266
|
} from "../chunk-XI7KRD2C.mjs";
|
|
237
267
|
import {
|
|
238
|
-
|
|
239
|
-
} from "../chunk-
|
|
268
|
+
drop
|
|
269
|
+
} from "../chunk-3EZAFZG3.mjs";
|
|
240
270
|
import {
|
|
241
|
-
|
|
242
|
-
} from "../chunk-
|
|
271
|
+
dropRight
|
|
272
|
+
} from "../chunk-OXZCMC5I.mjs";
|
|
243
273
|
import {
|
|
244
|
-
|
|
245
|
-
} from "../chunk-
|
|
274
|
+
dropRightWhile
|
|
275
|
+
} from "../chunk-M7SBBYV2.mjs";
|
|
246
276
|
import {
|
|
247
|
-
|
|
248
|
-
} from "../chunk-
|
|
277
|
+
dropWhile
|
|
278
|
+
} from "../chunk-LJ2C6MVP.mjs";
|
|
249
279
|
import "../chunk-YFN6KOC4.mjs";
|
|
250
280
|
import {
|
|
251
281
|
flatMap
|
|
@@ -256,15 +286,10 @@ import {
|
|
|
256
286
|
import {
|
|
257
287
|
flatten
|
|
258
288
|
} from "../chunk-33MSBDC6.mjs";
|
|
289
|
+
import "../chunk-E6C5EZQA.mjs";
|
|
259
290
|
import {
|
|
260
|
-
|
|
261
|
-
} from "../chunk-
|
|
262
|
-
import {
|
|
263
|
-
groupBy
|
|
264
|
-
} from "../chunk-E6E4RZLN.mjs";
|
|
265
|
-
import {
|
|
266
|
-
head
|
|
267
|
-
} from "../chunk-HM2JT2RX.mjs";
|
|
291
|
+
compact
|
|
292
|
+
} from "../chunk-DTJJIMKJ.mjs";
|
|
268
293
|
import {
|
|
269
294
|
countBy
|
|
270
295
|
} from "../chunk-CRSKT4WW.mjs";
|
|
@@ -275,29 +300,6 @@ import {
|
|
|
275
300
|
import {
|
|
276
301
|
differenceWith
|
|
277
302
|
} from "../chunk-6NVQAHXP.mjs";
|
|
278
|
-
import {
|
|
279
|
-
drop
|
|
280
|
-
} from "../chunk-3EZAFZG3.mjs";
|
|
281
|
-
import {
|
|
282
|
-
dropRight
|
|
283
|
-
} from "../chunk-OXZCMC5I.mjs";
|
|
284
|
-
import {
|
|
285
|
-
dropRightWhile
|
|
286
|
-
} from "../chunk-M7SBBYV2.mjs";
|
|
287
|
-
import {
|
|
288
|
-
dropWhile
|
|
289
|
-
} from "../chunk-LJ2C6MVP.mjs";
|
|
290
|
-
import "../chunk-F47GLYUU.mjs";
|
|
291
|
-
import {
|
|
292
|
-
AbortError
|
|
293
|
-
} from "../chunk-DXB7EZUQ.mjs";
|
|
294
|
-
import {
|
|
295
|
-
TimeoutError
|
|
296
|
-
} from "../chunk-KIOYQRMQ.mjs";
|
|
297
|
-
import "../chunk-E6C5EZQA.mjs";
|
|
298
|
-
import {
|
|
299
|
-
compact
|
|
300
|
-
} from "../chunk-DTJJIMKJ.mjs";
|
|
301
303
|
import "../chunk-24FKGR6U.mjs";
|
|
302
304
|
export {
|
|
303
305
|
AbortError,
|
|
@@ -347,6 +349,7 @@ export {
|
|
|
347
349
|
isNotNil,
|
|
348
350
|
isNull,
|
|
349
351
|
isPlainObject,
|
|
352
|
+
isTypedArray,
|
|
350
353
|
isUndefined,
|
|
351
354
|
kebabCase,
|
|
352
355
|
keyBy,
|
package/dist/error/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../chunk-F47GLYUU.mjs";
|
|
2
|
-
import {
|
|
3
|
-
AbortError
|
|
4
|
-
} from "../chunk-DXB7EZUQ.mjs";
|
|
5
2
|
import {
|
|
6
3
|
TimeoutError
|
|
7
4
|
} from "../chunk-KIOYQRMQ.mjs";
|
|
5
|
+
import {
|
|
6
|
+
AbortError
|
|
7
|
+
} from "../chunk-DXB7EZUQ.mjs";
|
|
8
8
|
import "../chunk-24FKGR6U.mjs";
|
|
9
9
|
export {
|
|
10
10
|
AbortError,
|
package/dist/index.d.mts
CHANGED
|
@@ -84,6 +84,7 @@ export { isLength } from './predicate/isLength.mjs';
|
|
|
84
84
|
export { isPlainObject } from './predicate/isPlainObject.mjs';
|
|
85
85
|
export { isFunction } from './predicate/isFunction.mjs';
|
|
86
86
|
export { isArrayLike } from './predicate/isArrayLike.mjs';
|
|
87
|
+
export { isTypedArray } from './predicate/isTypedArray.mjs';
|
|
87
88
|
export { delay } from './promise/delay.mjs';
|
|
88
89
|
export { withTimeout } from './promise/withTimeout.mjs';
|
|
89
90
|
export { camelCase } from './string/camelCase.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ export { isLength } from './predicate/isLength.js';
|
|
|
84
84
|
export { isPlainObject } from './predicate/isPlainObject.js';
|
|
85
85
|
export { isFunction } from './predicate/isFunction.js';
|
|
86
86
|
export { isArrayLike } from './predicate/isArrayLike.js';
|
|
87
|
+
export { isTypedArray } from './predicate/isTypedArray.js';
|
|
87
88
|
export { delay } from './promise/delay.js';
|
|
88
89
|
export { withTimeout } from './promise/withTimeout.js';
|
|
89
90
|
export { camelCase } from './string/camelCase.js';
|
package/dist/index.js
CHANGED
|
@@ -96,6 +96,7 @@ __export(src_exports, {
|
|
|
96
96
|
isNotNil: () => isNotNil,
|
|
97
97
|
isNull: () => isNull,
|
|
98
98
|
isPlainObject: () => isPlainObject,
|
|
99
|
+
isTypedArray: () => isTypedArray2,
|
|
99
100
|
isUndefined: () => isUndefined,
|
|
100
101
|
kebabCase: () => kebabCase,
|
|
101
102
|
keyBy: () => keyBy,
|
|
@@ -1144,6 +1145,11 @@ function isArrayLike(value) {
|
|
|
1144
1145
|
return value != null && typeof value !== "function" && isLength(value.length);
|
|
1145
1146
|
}
|
|
1146
1147
|
|
|
1148
|
+
// src/predicate/isTypedArray.ts
|
|
1149
|
+
function isTypedArray2(x) {
|
|
1150
|
+
return x instanceof Uint8Array || x instanceof Uint8ClampedArray || x instanceof Uint16Array || x instanceof Uint32Array || x instanceof BigUint64Array || x instanceof Int8Array || x instanceof Int16Array || x instanceof Int32Array || x instanceof BigInt64Array || x instanceof Float32Array || x instanceof Float64Array;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1147
1153
|
// src/promise/delay.ts
|
|
1148
1154
|
function delay(ms, { signal } = {}) {
|
|
1149
1155
|
return new Promise((resolve, reject) => {
|
|
@@ -1277,6 +1283,7 @@ function startCase(str) {
|
|
|
1277
1283
|
isNotNil,
|
|
1278
1284
|
isNull,
|
|
1279
1285
|
isPlainObject,
|
|
1286
|
+
isTypedArray,
|
|
1280
1287
|
isUndefined,
|
|
1281
1288
|
kebabCase,
|
|
1282
1289
|
keyBy,
|