es-toolkit 1.13.1-dev.304 → 1.13.1-dev.305
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 +35 -35
- package/dist/browser.js +12 -0
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +32 -30
- package/dist/browser.mjs.map +1 -1
- package/dist/chunk-74CREQXW.mjs +9 -0
- package/dist/chunk-74CREQXW.mjs.map +1 -0
- package/dist/chunk-J4SHAMXJ.mjs +13 -0
- package/dist/chunk-J4SHAMXJ.mjs.map +1 -0
- package/dist/chunk-U4JWMVQK.mjs +1 -0
- package/dist/{chunk-UDDG43RB.mjs → chunk-VV3J7RVG.mjs} +73 -65
- package/dist/{chunk-UDDG43RB.mjs.map → chunk-VV3J7RVG.mjs.map} +1 -1
- package/dist/compat/index.d.mts +2 -0
- package/dist/compat/index.d.ts +2 -0
- package/dist/compat/index.js +14 -0
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/index.mjs +74 -66
- package/dist/function/index.mjs +3 -3
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -67
- package/dist/predicate/index.d.mts +2 -0
- package/dist/predicate/index.d.ts +2 -0
- package/dist/predicate/index.js +14 -0
- package/dist/predicate/index.js.map +1 -1
- package/dist/predicate/index.mjs +15 -7
- package/dist/predicate/isArrayLike.d.mts +17 -0
- package/dist/predicate/isArrayLike.d.ts +17 -0
- package/dist/predicate/isArrayLike.js +40 -0
- package/dist/predicate/isArrayLike.js.map +1 -0
- package/dist/predicate/isArrayLike.mjs +9 -0
- package/dist/predicate/isArrayLike.mjs.map +1 -0
- package/dist/predicate/isFunction.d.mts +16 -0
- package/dist/predicate/isFunction.d.ts +16 -0
- package/dist/predicate/isFunction.js +33 -0
- package/dist/predicate/isFunction.js.map +1 -0
- package/dist/predicate/isFunction.mjs +8 -0
- package/dist/predicate/isFunction.mjs.map +1 -0
- package/dist/string/index.mjs +6 -6
- package/package.json +1 -1
- package/umd/browser.global.js +1 -1
- package/dist/chunk-B645AYL4.mjs +0 -1
- /package/dist/{chunk-B645AYL4.mjs.map → chunk-U4JWMVQK.mjs.map} +0 -0
package/dist/compat/index.mjs
CHANGED
|
@@ -11,9 +11,15 @@ import {
|
|
|
11
11
|
set,
|
|
12
12
|
startsWith,
|
|
13
13
|
zipObjectDeep
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-VV3J7RVG.mjs";
|
|
15
15
|
import "../chunk-NKLIE2OI.mjs";
|
|
16
16
|
import "../chunk-XT74R35S.mjs";
|
|
17
|
+
import {
|
|
18
|
+
camelCase
|
|
19
|
+
} from "../chunk-Y5V7UAZZ.mjs";
|
|
20
|
+
import {
|
|
21
|
+
capitalize
|
|
22
|
+
} from "../chunk-U56ZOM7L.mjs";
|
|
17
23
|
import {
|
|
18
24
|
kebabCase
|
|
19
25
|
} from "../chunk-EYYZQFOP.mjs";
|
|
@@ -26,6 +32,7 @@ import {
|
|
|
26
32
|
import {
|
|
27
33
|
startCase
|
|
28
34
|
} from "../chunk-QXTNZR7B.mjs";
|
|
35
|
+
import "../chunk-WVQ7YVRK.mjs";
|
|
29
36
|
import "../chunk-4OIZM4HS.mjs";
|
|
30
37
|
import {
|
|
31
38
|
withTimeout
|
|
@@ -34,32 +41,31 @@ import "../chunk-CVVZHOJX.mjs";
|
|
|
34
41
|
import {
|
|
35
42
|
delay
|
|
36
43
|
} from "../chunk-O64NE2P4.mjs";
|
|
44
|
+
import "../chunk-U4JWMVQK.mjs";
|
|
37
45
|
import {
|
|
38
|
-
|
|
39
|
-
} from "../chunk-
|
|
46
|
+
isNil
|
|
47
|
+
} from "../chunk-WMM7TZLG.mjs";
|
|
40
48
|
import {
|
|
41
|
-
|
|
42
|
-
} from "../chunk-
|
|
43
|
-
import "../chunk-WVQ7YVRK.mjs";
|
|
44
|
-
import "../chunk-B645AYL4.mjs";
|
|
49
|
+
isNotNil
|
|
50
|
+
} from "../chunk-BMRTZMRE.mjs";
|
|
45
51
|
import {
|
|
46
52
|
isNull
|
|
47
53
|
} from "../chunk-AIRSKN47.mjs";
|
|
48
54
|
import {
|
|
49
55
|
isUndefined
|
|
50
56
|
} from "../chunk-VH2PV426.mjs";
|
|
57
|
+
import {
|
|
58
|
+
isArrayLike
|
|
59
|
+
} from "../chunk-J4SHAMXJ.mjs";
|
|
51
60
|
import {
|
|
52
61
|
isEqual
|
|
53
62
|
} from "../chunk-JYSV56US.mjs";
|
|
63
|
+
import {
|
|
64
|
+
isFunction
|
|
65
|
+
} from "../chunk-74CREQXW.mjs";
|
|
54
66
|
import {
|
|
55
67
|
isLength
|
|
56
68
|
} from "../chunk-27QMXBLJ.mjs";
|
|
57
|
-
import {
|
|
58
|
-
isNil
|
|
59
|
-
} from "../chunk-WMM7TZLG.mjs";
|
|
60
|
-
import {
|
|
61
|
-
isNotNil
|
|
62
|
-
} from "../chunk-BMRTZMRE.mjs";
|
|
63
69
|
import "../chunk-54TK5BIS.mjs";
|
|
64
70
|
import {
|
|
65
71
|
omitBy
|
|
@@ -108,32 +114,7 @@ import {
|
|
|
108
114
|
import {
|
|
109
115
|
range
|
|
110
116
|
} from "../chunk-DPH2KE6O.mjs";
|
|
111
|
-
import "../chunk-236H5JZJ.mjs";
|
|
112
|
-
import {
|
|
113
|
-
debounce
|
|
114
|
-
} from "../chunk-3IP4JVLL.mjs";
|
|
115
|
-
import {
|
|
116
|
-
negate
|
|
117
|
-
} from "../chunk-BOOQBJN2.mjs";
|
|
118
|
-
import {
|
|
119
|
-
noop
|
|
120
|
-
} from "../chunk-LKXCOLNY.mjs";
|
|
121
|
-
import {
|
|
122
|
-
once
|
|
123
|
-
} from "../chunk-CMBC4MXG.mjs";
|
|
124
|
-
import {
|
|
125
|
-
throttle
|
|
126
|
-
} from "../chunk-QOJGMVVR.mjs";
|
|
127
117
|
import "../chunk-DDH7K4QM.mjs";
|
|
128
|
-
import {
|
|
129
|
-
zipObject
|
|
130
|
-
} from "../chunk-6GWEY5EL.mjs";
|
|
131
|
-
import {
|
|
132
|
-
zipWith
|
|
133
|
-
} from "../chunk-4KYXHZ4R.mjs";
|
|
134
|
-
import {
|
|
135
|
-
unzip
|
|
136
|
-
} from "../chunk-UYZKMBDO.mjs";
|
|
137
118
|
import {
|
|
138
119
|
unzipWith
|
|
139
120
|
} from "../chunk-IFNXROZR.mjs";
|
|
@@ -153,11 +134,11 @@ import {
|
|
|
153
134
|
zip
|
|
154
135
|
} from "../chunk-IDCUZVJL.mjs";
|
|
155
136
|
import {
|
|
156
|
-
|
|
157
|
-
} from "../chunk-
|
|
137
|
+
zipObject
|
|
138
|
+
} from "../chunk-6GWEY5EL.mjs";
|
|
158
139
|
import {
|
|
159
|
-
|
|
160
|
-
} from "../chunk-
|
|
140
|
+
zipWith
|
|
141
|
+
} from "../chunk-4KYXHZ4R.mjs";
|
|
161
142
|
import {
|
|
162
143
|
toFilled
|
|
163
144
|
} from "../chunk-OP4OAKQJ.mjs";
|
|
@@ -170,9 +151,6 @@ import {
|
|
|
170
151
|
import {
|
|
171
152
|
unionWith
|
|
172
153
|
} from "../chunk-2ZCITDMK.mjs";
|
|
173
|
-
import {
|
|
174
|
-
uniqWith
|
|
175
|
-
} from "../chunk-237HGSZS.mjs";
|
|
176
154
|
import {
|
|
177
155
|
uniq
|
|
178
156
|
} from "../chunk-DVK2N4KC.mjs";
|
|
@@ -180,11 +158,11 @@ import {
|
|
|
180
158
|
uniqBy
|
|
181
159
|
} from "../chunk-B4COTK4K.mjs";
|
|
182
160
|
import {
|
|
183
|
-
|
|
184
|
-
} from "../chunk-
|
|
161
|
+
uniqWith
|
|
162
|
+
} from "../chunk-237HGSZS.mjs";
|
|
185
163
|
import {
|
|
186
|
-
|
|
187
|
-
} from "../chunk-
|
|
164
|
+
unzip
|
|
165
|
+
} from "../chunk-UYZKMBDO.mjs";
|
|
188
166
|
import {
|
|
189
167
|
sample
|
|
190
168
|
} from "../chunk-2KNLZB7V.mjs";
|
|
@@ -210,11 +188,11 @@ import {
|
|
|
210
188
|
takeRight
|
|
211
189
|
} from "../chunk-N3QYJX4T.mjs";
|
|
212
190
|
import {
|
|
213
|
-
|
|
214
|
-
} from "../chunk-
|
|
191
|
+
takeRightWhile
|
|
192
|
+
} from "../chunk-NTLX2MPV.mjs";
|
|
215
193
|
import {
|
|
216
|
-
|
|
217
|
-
} from "../chunk-
|
|
194
|
+
takeWhile
|
|
195
|
+
} from "../chunk-2IXFGSUA.mjs";
|
|
218
196
|
import {
|
|
219
197
|
intersectionBy
|
|
220
198
|
} from "../chunk-O6UXZR3U.mjs";
|
|
@@ -234,17 +212,14 @@ import {
|
|
|
234
212
|
minBy
|
|
235
213
|
} from "../chunk-IJD7FE2Z.mjs";
|
|
236
214
|
import {
|
|
237
|
-
|
|
238
|
-
} from "../chunk-
|
|
215
|
+
orderBy
|
|
216
|
+
} from "../chunk-7B7W36UP.mjs";
|
|
239
217
|
import {
|
|
240
|
-
|
|
241
|
-
} from "../chunk-
|
|
218
|
+
partition
|
|
219
|
+
} from "../chunk-DN3NOZ3H.mjs";
|
|
242
220
|
import {
|
|
243
221
|
flattenDeep
|
|
244
222
|
} from "../chunk-ML727RRJ.mjs";
|
|
245
|
-
import {
|
|
246
|
-
flatten
|
|
247
|
-
} from "../chunk-33MSBDC6.mjs";
|
|
248
223
|
import {
|
|
249
224
|
forEachRight
|
|
250
225
|
} from "../chunk-IEA53J7P.mjs";
|
|
@@ -255,9 +230,11 @@ import {
|
|
|
255
230
|
head
|
|
256
231
|
} from "../chunk-HM2JT2RX.mjs";
|
|
257
232
|
import {
|
|
258
|
-
|
|
259
|
-
} from "../chunk-
|
|
260
|
-
import
|
|
233
|
+
initial
|
|
234
|
+
} from "../chunk-XPSOKBRZ.mjs";
|
|
235
|
+
import {
|
|
236
|
+
intersection
|
|
237
|
+
} from "../chunk-FVVSE2F2.mjs";
|
|
261
238
|
import {
|
|
262
239
|
differenceBy
|
|
263
240
|
} from "../chunk-LVWX5B43.mjs";
|
|
@@ -276,6 +253,23 @@ import {
|
|
|
276
253
|
import {
|
|
277
254
|
dropWhile
|
|
278
255
|
} from "../chunk-LJ2C6MVP.mjs";
|
|
256
|
+
import {
|
|
257
|
+
fill
|
|
258
|
+
} from "../chunk-YFN6KOC4.mjs";
|
|
259
|
+
import {
|
|
260
|
+
flatMap
|
|
261
|
+
} from "../chunk-UY76KTPE.mjs";
|
|
262
|
+
import {
|
|
263
|
+
flatten
|
|
264
|
+
} from "../chunk-33MSBDC6.mjs";
|
|
265
|
+
import "../chunk-E6C5EZQA.mjs";
|
|
266
|
+
import {
|
|
267
|
+
compact
|
|
268
|
+
} from "../chunk-DTJJIMKJ.mjs";
|
|
269
|
+
import {
|
|
270
|
+
countBy
|
|
271
|
+
} from "../chunk-CRSKT4WW.mjs";
|
|
272
|
+
import "../chunk-JPUKH67K.mjs";
|
|
279
273
|
import "../chunk-F47GLYUU.mjs";
|
|
280
274
|
import {
|
|
281
275
|
AbortError
|
|
@@ -283,10 +277,22 @@ import {
|
|
|
283
277
|
import {
|
|
284
278
|
TimeoutError
|
|
285
279
|
} from "../chunk-KIOYQRMQ.mjs";
|
|
286
|
-
import "../chunk-
|
|
280
|
+
import "../chunk-236H5JZJ.mjs";
|
|
287
281
|
import {
|
|
288
|
-
|
|
289
|
-
} from "../chunk-
|
|
282
|
+
negate
|
|
283
|
+
} from "../chunk-BOOQBJN2.mjs";
|
|
284
|
+
import {
|
|
285
|
+
noop
|
|
286
|
+
} from "../chunk-LKXCOLNY.mjs";
|
|
287
|
+
import {
|
|
288
|
+
once
|
|
289
|
+
} from "../chunk-CMBC4MXG.mjs";
|
|
290
|
+
import {
|
|
291
|
+
throttle
|
|
292
|
+
} from "../chunk-QOJGMVVR.mjs";
|
|
293
|
+
import {
|
|
294
|
+
debounce
|
|
295
|
+
} from "../chunk-3IP4JVLL.mjs";
|
|
290
296
|
import "../chunk-24FKGR6U.mjs";
|
|
291
297
|
export {
|
|
292
298
|
AbortError,
|
|
@@ -326,7 +332,9 @@ export {
|
|
|
326
332
|
intersectionWith,
|
|
327
333
|
invert,
|
|
328
334
|
isArray,
|
|
335
|
+
isArrayLike,
|
|
329
336
|
isEqual,
|
|
337
|
+
isFunction,
|
|
330
338
|
isLength,
|
|
331
339
|
isNil,
|
|
332
340
|
isNotNil,
|
package/dist/function/index.mjs
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import "../chunk-236H5JZJ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
debounce
|
|
4
|
-
} from "../chunk-3IP4JVLL.mjs";
|
|
5
2
|
import {
|
|
6
3
|
negate
|
|
7
4
|
} from "../chunk-BOOQBJN2.mjs";
|
|
@@ -14,6 +11,9 @@ import {
|
|
|
14
11
|
import {
|
|
15
12
|
throttle
|
|
16
13
|
} from "../chunk-QOJGMVVR.mjs";
|
|
14
|
+
import {
|
|
15
|
+
debounce
|
|
16
|
+
} from "../chunk-3IP4JVLL.mjs";
|
|
17
17
|
import "../chunk-24FKGR6U.mjs";
|
|
18
18
|
export {
|
|
19
19
|
debounce,
|
package/dist/index.d.mts
CHANGED
|
@@ -80,6 +80,8 @@ export { isNull } from './predicate/isNull.mjs';
|
|
|
80
80
|
export { isUndefined } from './predicate/isUndefined.mjs';
|
|
81
81
|
export { isLength } from './predicate/isLength.mjs';
|
|
82
82
|
export { isPlainObject } from './predicate/isPlainObject.mjs';
|
|
83
|
+
export { isFunction } from './predicate/isFunction.mjs';
|
|
84
|
+
export { isArrayLike } from './predicate/isArrayLike.mjs';
|
|
83
85
|
export { delay } from './promise/delay.mjs';
|
|
84
86
|
export { withTimeout } from './promise/withTimeout.mjs';
|
|
85
87
|
export { camelCase } from './string/camelCase.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -80,6 +80,8 @@ export { isNull } from './predicate/isNull.js';
|
|
|
80
80
|
export { isUndefined } from './predicate/isUndefined.js';
|
|
81
81
|
export { isLength } from './predicate/isLength.js';
|
|
82
82
|
export { isPlainObject } from './predicate/isPlainObject.js';
|
|
83
|
+
export { isFunction } from './predicate/isFunction.js';
|
|
84
|
+
export { isArrayLike } from './predicate/isArrayLike.js';
|
|
83
85
|
export { delay } from './promise/delay.js';
|
|
84
86
|
export { withTimeout } from './promise/withTimeout.js';
|
|
85
87
|
export { camelCase } from './string/camelCase.js';
|
package/dist/index.js
CHANGED
|
@@ -86,7 +86,9 @@ __export(src_exports, {
|
|
|
86
86
|
intersectionBy: () => intersectionBy,
|
|
87
87
|
intersectionWith: () => intersectionWith,
|
|
88
88
|
invert: () => invert,
|
|
89
|
+
isArrayLike: () => isArrayLike,
|
|
89
90
|
isEqual: () => isEqual,
|
|
91
|
+
isFunction: () => isFunction,
|
|
90
92
|
isLength: () => isLength,
|
|
91
93
|
isNil: () => isNil,
|
|
92
94
|
isNotNil: () => isNotNil,
|
|
@@ -1027,6 +1029,16 @@ function isLength(value) {
|
|
|
1027
1029
|
return typeof value === "number" && value > -1 && value % 1 === 0 && value <= Number.MAX_SAFE_INTEGER;
|
|
1028
1030
|
}
|
|
1029
1031
|
|
|
1032
|
+
// src/predicate/isFunction.ts
|
|
1033
|
+
function isFunction(value) {
|
|
1034
|
+
return typeof value === "function";
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
// src/predicate/isArrayLike.ts
|
|
1038
|
+
function isArrayLike(value) {
|
|
1039
|
+
return value != null && typeof value !== "function" && isLength(value.length);
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1030
1042
|
// src/promise/delay.ts
|
|
1031
1043
|
function delay(ms, { signal } = {}) {
|
|
1032
1044
|
return new Promise((resolve, reject) => {
|
|
@@ -1150,7 +1162,9 @@ function startCase(str) {
|
|
|
1150
1162
|
intersectionBy,
|
|
1151
1163
|
intersectionWith,
|
|
1152
1164
|
invert,
|
|
1165
|
+
isArrayLike,
|
|
1153
1166
|
isEqual,
|
|
1167
|
+
isFunction,
|
|
1154
1168
|
isLength,
|
|
1155
1169
|
isNil,
|
|
1156
1170
|
isNotNil,
|