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/array/index.mjs
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import "../chunk-DDH7K4QM.mjs";
|
|
2
|
+
import {
|
|
3
|
+
xor
|
|
4
|
+
} from "../chunk-L7FQX5MN.mjs";
|
|
5
|
+
import {
|
|
6
|
+
xorBy
|
|
7
|
+
} from "../chunk-Q47NGNXT.mjs";
|
|
8
|
+
import {
|
|
9
|
+
xorWith
|
|
10
|
+
} from "../chunk-QRSJBBFY.mjs";
|
|
11
|
+
import {
|
|
12
|
+
zip
|
|
13
|
+
} from "../chunk-OLORW442.mjs";
|
|
2
14
|
import {
|
|
3
15
|
zipObject
|
|
4
16
|
} from "../chunk-6GWEY5EL.mjs";
|
|
5
17
|
import {
|
|
6
18
|
zipWith
|
|
7
19
|
} from "../chunk-4KYXHZ4R.mjs";
|
|
20
|
+
import {
|
|
21
|
+
unionBy
|
|
22
|
+
} from "../chunk-NFS7RWWE.mjs";
|
|
23
|
+
import {
|
|
24
|
+
unionWith
|
|
25
|
+
} from "../chunk-2ZCITDMK.mjs";
|
|
26
|
+
import {
|
|
27
|
+
uniqBy
|
|
28
|
+
} from "../chunk-B4COTK4K.mjs";
|
|
29
|
+
import {
|
|
30
|
+
uniqWith
|
|
31
|
+
} from "../chunk-237HGSZS.mjs";
|
|
8
32
|
import {
|
|
9
33
|
unzip
|
|
10
34
|
} from "../chunk-UYZKMBDO.mjs";
|
|
@@ -15,17 +39,17 @@ import {
|
|
|
15
39
|
without
|
|
16
40
|
} from "../chunk-PYEYV7BY.mjs";
|
|
17
41
|
import {
|
|
18
|
-
|
|
19
|
-
} from "../chunk-
|
|
42
|
+
shuffle
|
|
43
|
+
} from "../chunk-G7UQ5PUR.mjs";
|
|
20
44
|
import {
|
|
21
|
-
|
|
22
|
-
} from "../chunk-
|
|
45
|
+
tail
|
|
46
|
+
} from "../chunk-TJ4Z5I7M.mjs";
|
|
23
47
|
import {
|
|
24
|
-
|
|
25
|
-
} from "../chunk-
|
|
48
|
+
take
|
|
49
|
+
} from "../chunk-ME352XO7.mjs";
|
|
26
50
|
import {
|
|
27
|
-
|
|
28
|
-
} from "../chunk-
|
|
51
|
+
takeRight
|
|
52
|
+
} from "../chunk-N3QYJX4T.mjs";
|
|
29
53
|
import {
|
|
30
54
|
takeRightWhile
|
|
31
55
|
} from "../chunk-NTLX2MPV.mjs";
|
|
@@ -39,20 +63,20 @@ import {
|
|
|
39
63
|
union
|
|
40
64
|
} from "../chunk-R6QA7PLZ.mjs";
|
|
41
65
|
import {
|
|
42
|
-
|
|
43
|
-
} from "../chunk-
|
|
66
|
+
uniq
|
|
67
|
+
} from "../chunk-DVK2N4KC.mjs";
|
|
44
68
|
import {
|
|
45
|
-
|
|
46
|
-
} from "../chunk-
|
|
69
|
+
keyBy
|
|
70
|
+
} from "../chunk-AJKZMN2V.mjs";
|
|
47
71
|
import {
|
|
48
|
-
|
|
49
|
-
} from "../chunk-
|
|
72
|
+
last
|
|
73
|
+
} from "../chunk-KPBQ7OUY.mjs";
|
|
50
74
|
import {
|
|
51
|
-
|
|
52
|
-
} from "../chunk-
|
|
75
|
+
maxBy
|
|
76
|
+
} from "../chunk-OOKNBU4V.mjs";
|
|
53
77
|
import {
|
|
54
|
-
|
|
55
|
-
} from "../chunk-
|
|
78
|
+
minBy
|
|
79
|
+
} from "../chunk-IJD7FE2Z.mjs";
|
|
56
80
|
import {
|
|
57
81
|
orderBy
|
|
58
82
|
} from "../chunk-7B7W36UP.mjs";
|
|
@@ -68,17 +92,14 @@ import {
|
|
|
68
92
|
import "../chunk-GIWAOOFY.mjs";
|
|
69
93
|
import "../chunk-SYWMYQYJ.mjs";
|
|
70
94
|
import {
|
|
71
|
-
|
|
72
|
-
} from "../chunk-
|
|
73
|
-
import {
|
|
74
|
-
tail
|
|
75
|
-
} from "../chunk-TJ4Z5I7M.mjs";
|
|
95
|
+
forEachRight
|
|
96
|
+
} from "../chunk-IEA53J7P.mjs";
|
|
76
97
|
import {
|
|
77
|
-
|
|
78
|
-
} from "../chunk-
|
|
98
|
+
groupBy
|
|
99
|
+
} from "../chunk-E6E4RZLN.mjs";
|
|
79
100
|
import {
|
|
80
|
-
|
|
81
|
-
} from "../chunk-
|
|
101
|
+
head
|
|
102
|
+
} from "../chunk-HM2JT2RX.mjs";
|
|
82
103
|
import {
|
|
83
104
|
initial
|
|
84
105
|
} from "../chunk-XPSOKBRZ.mjs";
|
|
@@ -92,17 +113,17 @@ import {
|
|
|
92
113
|
intersectionWith
|
|
93
114
|
} from "../chunk-XI7KRD2C.mjs";
|
|
94
115
|
import {
|
|
95
|
-
|
|
96
|
-
} from "../chunk-
|
|
116
|
+
drop
|
|
117
|
+
} from "../chunk-3EZAFZG3.mjs";
|
|
97
118
|
import {
|
|
98
|
-
|
|
99
|
-
} from "../chunk-
|
|
119
|
+
dropRight
|
|
120
|
+
} from "../chunk-OXZCMC5I.mjs";
|
|
100
121
|
import {
|
|
101
|
-
|
|
102
|
-
} from "../chunk-
|
|
122
|
+
dropRightWhile
|
|
123
|
+
} from "../chunk-M7SBBYV2.mjs";
|
|
103
124
|
import {
|
|
104
|
-
|
|
105
|
-
} from "../chunk-
|
|
125
|
+
dropWhile
|
|
126
|
+
} from "../chunk-LJ2C6MVP.mjs";
|
|
106
127
|
import {
|
|
107
128
|
fill
|
|
108
129
|
} from "../chunk-YFN6KOC4.mjs";
|
|
@@ -116,14 +137,11 @@ import {
|
|
|
116
137
|
flatten
|
|
117
138
|
} from "../chunk-33MSBDC6.mjs";
|
|
118
139
|
import {
|
|
119
|
-
|
|
120
|
-
} from "../chunk-
|
|
121
|
-
import {
|
|
122
|
-
groupBy
|
|
123
|
-
} from "../chunk-E6E4RZLN.mjs";
|
|
140
|
+
chunk
|
|
141
|
+
} from "../chunk-E6C5EZQA.mjs";
|
|
124
142
|
import {
|
|
125
|
-
|
|
126
|
-
} from "../chunk-
|
|
143
|
+
compact
|
|
144
|
+
} from "../chunk-DTJJIMKJ.mjs";
|
|
127
145
|
import {
|
|
128
146
|
countBy
|
|
129
147
|
} from "../chunk-CRSKT4WW.mjs";
|
|
@@ -136,24 +154,6 @@ import {
|
|
|
136
154
|
import {
|
|
137
155
|
differenceWith
|
|
138
156
|
} from "../chunk-6NVQAHXP.mjs";
|
|
139
|
-
import {
|
|
140
|
-
drop
|
|
141
|
-
} from "../chunk-3EZAFZG3.mjs";
|
|
142
|
-
import {
|
|
143
|
-
dropRight
|
|
144
|
-
} from "../chunk-OXZCMC5I.mjs";
|
|
145
|
-
import {
|
|
146
|
-
dropRightWhile
|
|
147
|
-
} from "../chunk-M7SBBYV2.mjs";
|
|
148
|
-
import {
|
|
149
|
-
dropWhile
|
|
150
|
-
} from "../chunk-LJ2C6MVP.mjs";
|
|
151
|
-
import {
|
|
152
|
-
chunk
|
|
153
|
-
} from "../chunk-E6C5EZQA.mjs";
|
|
154
|
-
import {
|
|
155
|
-
compact
|
|
156
|
-
} from "../chunk-DTJJIMKJ.mjs";
|
|
157
157
|
import "../chunk-24FKGR6U.mjs";
|
|
158
158
|
export {
|
|
159
159
|
chunk,
|
package/dist/browser.js
CHANGED
|
@@ -90,6 +90,7 @@ __export(compat_exports, {
|
|
|
90
90
|
isNotNil: () => isNotNil,
|
|
91
91
|
isNull: () => isNull,
|
|
92
92
|
isPlainObject: () => isPlainObject2,
|
|
93
|
+
isTypedArray: () => isTypedArray3,
|
|
93
94
|
isUndefined: () => isUndefined,
|
|
94
95
|
kebabCase: () => kebabCase,
|
|
95
96
|
keyBy: () => keyBy,
|
|
@@ -1142,6 +1143,11 @@ function isArrayLike(value) {
|
|
|
1142
1143
|
return value != null && typeof value !== "function" && isLength(value.length);
|
|
1143
1144
|
}
|
|
1144
1145
|
|
|
1146
|
+
// src/predicate/isTypedArray.ts
|
|
1147
|
+
function isTypedArray2(x) {
|
|
1148
|
+
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;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1145
1151
|
// src/promise/delay.ts
|
|
1146
1152
|
function delay(ms, { signal } = {}) {
|
|
1147
1153
|
return new Promise((resolve, reject) => {
|
|
@@ -1424,6 +1430,11 @@ function isArray(value) {
|
|
|
1424
1430
|
return Array.isArray(value);
|
|
1425
1431
|
}
|
|
1426
1432
|
|
|
1433
|
+
// src/compat/predicate/isTypedArray.ts
|
|
1434
|
+
function isTypedArray3(x) {
|
|
1435
|
+
return isTypedArray2(x);
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1427
1438
|
// src/compat/string/startsWith.ts
|
|
1428
1439
|
var startsWith = (str, target, position = 0) => {
|
|
1429
1440
|
return str.startsWith(target, position);
|