es-toolkit 1.13.1-dev.295 → 1.13.1-dev.298
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 +3 -1
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +25 -25
- package/dist/{chunk-QJZPJCVU.mjs → chunk-72G6BLM4.mjs} +56 -56
- package/dist/{chunk-U4JGKZ56.mjs → chunk-VRUTBJYS.mjs} +4 -2
- package/dist/{chunk-U4JGKZ56.mjs.map → chunk-VRUTBJYS.mjs.map} +1 -1
- package/dist/compat/index.js +3 -1
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/index.mjs +55 -55
- package/dist/function/index.mjs +3 -3
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -56
- package/dist/object/clone.js +3 -1
- package/dist/object/clone.js.map +1 -1
- package/dist/object/clone.mjs +1 -1
- package/dist/object/index.js +3 -1
- package/dist/object/index.js.map +1 -1
- package/dist/object/index.mjs +1 -1
- package/package.json +1 -1
- package/umd/browser.global.js +1 -1
- /package/dist/{chunk-QJZPJCVU.mjs.map → chunk-72G6BLM4.mjs.map} +0 -0
package/dist/browser.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compat_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-72G6BLM4.mjs";
|
|
4
4
|
import "./chunk-NKLIE2OI.mjs";
|
|
5
5
|
import "./chunk-XT74R35S.mjs";
|
|
6
6
|
import "./chunk-EYYZQFOP.mjs";
|
|
@@ -25,7 +25,7 @@ import "./chunk-54TK5BIS.mjs";
|
|
|
25
25
|
import "./chunk-BCTYOXT7.mjs";
|
|
26
26
|
import "./chunk-HPFDYUGP.mjs";
|
|
27
27
|
import "./chunk-6CLH5YZ2.mjs";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-VRUTBJYS.mjs";
|
|
29
29
|
import "./chunk-XGQWTHW6.mjs";
|
|
30
30
|
import "./chunk-MIGAC7F4.mjs";
|
|
31
31
|
import "./chunk-OLX53VEF.mjs";
|
|
@@ -39,33 +39,23 @@ import "./chunk-MY4G7R3I.mjs";
|
|
|
39
39
|
import "./chunk-5ASRKEB4.mjs";
|
|
40
40
|
import "./chunk-2SLTL4KL.mjs";
|
|
41
41
|
import "./chunk-DPH2KE6O.mjs";
|
|
42
|
-
import "./chunk-236H5JZJ.mjs";
|
|
43
|
-
import "./chunk-3IP4JVLL.mjs";
|
|
44
|
-
import "./chunk-BOOQBJN2.mjs";
|
|
45
|
-
import "./chunk-LKXCOLNY.mjs";
|
|
46
|
-
import "./chunk-CMBC4MXG.mjs";
|
|
47
|
-
import "./chunk-QOJGMVVR.mjs";
|
|
48
42
|
import "./chunk-DDH7K4QM.mjs";
|
|
49
|
-
import "./chunk-6GWEY5EL.mjs";
|
|
50
|
-
import "./chunk-4KYXHZ4R.mjs";
|
|
51
|
-
import "./chunk-UYZKMBDO.mjs";
|
|
52
43
|
import "./chunk-IFNXROZR.mjs";
|
|
53
44
|
import "./chunk-PYEYV7BY.mjs";
|
|
54
45
|
import "./chunk-L7FQX5MN.mjs";
|
|
55
46
|
import "./chunk-Q47NGNXT.mjs";
|
|
56
47
|
import "./chunk-QRSJBBFY.mjs";
|
|
57
48
|
import "./chunk-IDCUZVJL.mjs";
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-6GWEY5EL.mjs";
|
|
50
|
+
import "./chunk-4KYXHZ4R.mjs";
|
|
60
51
|
import "./chunk-OP4OAKQJ.mjs";
|
|
61
52
|
import "./chunk-R6QA7PLZ.mjs";
|
|
62
53
|
import "./chunk-NFS7RWWE.mjs";
|
|
63
54
|
import "./chunk-2ZCITDMK.mjs";
|
|
64
|
-
import "./chunk-237HGSZS.mjs";
|
|
65
55
|
import "./chunk-DVK2N4KC.mjs";
|
|
66
56
|
import "./chunk-B4COTK4K.mjs";
|
|
67
|
-
import "./chunk-
|
|
68
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-237HGSZS.mjs";
|
|
58
|
+
import "./chunk-UYZKMBDO.mjs";
|
|
69
59
|
import "./chunk-2KNLZB7V.mjs";
|
|
70
60
|
import "./chunk-EHSKB6DF.mjs";
|
|
71
61
|
import "./chunk-GIWAOOFY.mjs";
|
|
@@ -74,34 +64,44 @@ import "./chunk-G7UQ5PUR.mjs";
|
|
|
74
64
|
import "./chunk-TJ4Z5I7M.mjs";
|
|
75
65
|
import "./chunk-ME352XO7.mjs";
|
|
76
66
|
import "./chunk-IQLKIDXF.mjs";
|
|
77
|
-
import "./chunk-
|
|
78
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-NTLX2MPV.mjs";
|
|
68
|
+
import "./chunk-2IXFGSUA.mjs";
|
|
79
69
|
import "./chunk-O6UXZR3U.mjs";
|
|
80
70
|
import "./chunk-XI7KRD2C.mjs";
|
|
81
71
|
import "./chunk-AJKZMN2V.mjs";
|
|
82
72
|
import "./chunk-KPBQ7OUY.mjs";
|
|
83
73
|
import "./chunk-OOKNBU4V.mjs";
|
|
84
74
|
import "./chunk-IJD7FE2Z.mjs";
|
|
85
|
-
import "./chunk-
|
|
86
|
-
import "./chunk-
|
|
75
|
+
import "./chunk-7B7W36UP.mjs";
|
|
76
|
+
import "./chunk-DN3NOZ3H.mjs";
|
|
87
77
|
import "./chunk-ML727RRJ.mjs";
|
|
88
|
-
import "./chunk-33MSBDC6.mjs";
|
|
89
78
|
import "./chunk-IEA53J7P.mjs";
|
|
90
79
|
import "./chunk-E6E4RZLN.mjs";
|
|
91
80
|
import "./chunk-HM2JT2RX.mjs";
|
|
92
|
-
import "./chunk-
|
|
93
|
-
import "./chunk-
|
|
81
|
+
import "./chunk-XPSOKBRZ.mjs";
|
|
82
|
+
import "./chunk-FVVSE2F2.mjs";
|
|
94
83
|
import "./chunk-LVWX5B43.mjs";
|
|
95
84
|
import "./chunk-6NVQAHXP.mjs";
|
|
96
85
|
import "./chunk-3EZAFZG3.mjs";
|
|
97
86
|
import "./chunk-OXZCMC5I.mjs";
|
|
98
87
|
import "./chunk-M7SBBYV2.mjs";
|
|
99
88
|
import "./chunk-LJ2C6MVP.mjs";
|
|
89
|
+
import "./chunk-YFN6KOC4.mjs";
|
|
90
|
+
import "./chunk-UY76KTPE.mjs";
|
|
91
|
+
import "./chunk-33MSBDC6.mjs";
|
|
92
|
+
import "./chunk-E6C5EZQA.mjs";
|
|
93
|
+
import "./chunk-DTJJIMKJ.mjs";
|
|
94
|
+
import "./chunk-CRSKT4WW.mjs";
|
|
95
|
+
import "./chunk-JPUKH67K.mjs";
|
|
100
96
|
import "./chunk-F47GLYUU.mjs";
|
|
101
97
|
import "./chunk-DXB7EZUQ.mjs";
|
|
102
98
|
import "./chunk-KIOYQRMQ.mjs";
|
|
103
|
-
import "./chunk-
|
|
104
|
-
import "./chunk-
|
|
99
|
+
import "./chunk-236H5JZJ.mjs";
|
|
100
|
+
import "./chunk-BOOQBJN2.mjs";
|
|
101
|
+
import "./chunk-LKXCOLNY.mjs";
|
|
102
|
+
import "./chunk-CMBC4MXG.mjs";
|
|
103
|
+
import "./chunk-QOJGMVVR.mjs";
|
|
104
|
+
import "./chunk-3IP4JVLL.mjs";
|
|
105
105
|
import "./chunk-24FKGR6U.mjs";
|
|
106
106
|
|
|
107
107
|
// src/browser.ts
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
} from "./chunk-6CLH5YZ2.mjs";
|
|
52
52
|
import {
|
|
53
53
|
clone
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-VRUTBJYS.mjs";
|
|
55
55
|
import {
|
|
56
56
|
flattenObject
|
|
57
57
|
} from "./chunk-XGQWTHW6.mjs";
|
|
@@ -85,30 +85,6 @@ import {
|
|
|
85
85
|
import {
|
|
86
86
|
range
|
|
87
87
|
} from "./chunk-DPH2KE6O.mjs";
|
|
88
|
-
import {
|
|
89
|
-
debounce
|
|
90
|
-
} from "./chunk-3IP4JVLL.mjs";
|
|
91
|
-
import {
|
|
92
|
-
negate
|
|
93
|
-
} from "./chunk-BOOQBJN2.mjs";
|
|
94
|
-
import {
|
|
95
|
-
noop
|
|
96
|
-
} from "./chunk-LKXCOLNY.mjs";
|
|
97
|
-
import {
|
|
98
|
-
once
|
|
99
|
-
} from "./chunk-CMBC4MXG.mjs";
|
|
100
|
-
import {
|
|
101
|
-
throttle
|
|
102
|
-
} from "./chunk-QOJGMVVR.mjs";
|
|
103
|
-
import {
|
|
104
|
-
zipObject
|
|
105
|
-
} from "./chunk-6GWEY5EL.mjs";
|
|
106
|
-
import {
|
|
107
|
-
zipWith
|
|
108
|
-
} from "./chunk-4KYXHZ4R.mjs";
|
|
109
|
-
import {
|
|
110
|
-
unzip
|
|
111
|
-
} from "./chunk-UYZKMBDO.mjs";
|
|
112
88
|
import {
|
|
113
89
|
unzipWith
|
|
114
90
|
} from "./chunk-IFNXROZR.mjs";
|
|
@@ -128,11 +104,11 @@ import {
|
|
|
128
104
|
zip
|
|
129
105
|
} from "./chunk-IDCUZVJL.mjs";
|
|
130
106
|
import {
|
|
131
|
-
|
|
132
|
-
} from "./chunk-
|
|
107
|
+
zipObject
|
|
108
|
+
} from "./chunk-6GWEY5EL.mjs";
|
|
133
109
|
import {
|
|
134
|
-
|
|
135
|
-
} from "./chunk-
|
|
110
|
+
zipWith
|
|
111
|
+
} from "./chunk-4KYXHZ4R.mjs";
|
|
136
112
|
import {
|
|
137
113
|
toFilled
|
|
138
114
|
} from "./chunk-OP4OAKQJ.mjs";
|
|
@@ -145,9 +121,6 @@ import {
|
|
|
145
121
|
import {
|
|
146
122
|
unionWith
|
|
147
123
|
} from "./chunk-2ZCITDMK.mjs";
|
|
148
|
-
import {
|
|
149
|
-
uniqWith
|
|
150
|
-
} from "./chunk-237HGSZS.mjs";
|
|
151
124
|
import {
|
|
152
125
|
uniq
|
|
153
126
|
} from "./chunk-DVK2N4KC.mjs";
|
|
@@ -155,11 +128,11 @@ import {
|
|
|
155
128
|
uniqBy
|
|
156
129
|
} from "./chunk-B4COTK4K.mjs";
|
|
157
130
|
import {
|
|
158
|
-
|
|
159
|
-
} from "./chunk-
|
|
131
|
+
uniqWith
|
|
132
|
+
} from "./chunk-237HGSZS.mjs";
|
|
160
133
|
import {
|
|
161
|
-
|
|
162
|
-
} from "./chunk-
|
|
134
|
+
unzip
|
|
135
|
+
} from "./chunk-UYZKMBDO.mjs";
|
|
163
136
|
import {
|
|
164
137
|
sample
|
|
165
138
|
} from "./chunk-2KNLZB7V.mjs";
|
|
@@ -185,11 +158,11 @@ import {
|
|
|
185
158
|
takeRight
|
|
186
159
|
} from "./chunk-IQLKIDXF.mjs";
|
|
187
160
|
import {
|
|
188
|
-
|
|
189
|
-
} from "./chunk-
|
|
161
|
+
takeRightWhile
|
|
162
|
+
} from "./chunk-NTLX2MPV.mjs";
|
|
190
163
|
import {
|
|
191
|
-
|
|
192
|
-
} from "./chunk-
|
|
164
|
+
takeWhile
|
|
165
|
+
} from "./chunk-2IXFGSUA.mjs";
|
|
193
166
|
import {
|
|
194
167
|
intersectionBy
|
|
195
168
|
} from "./chunk-O6UXZR3U.mjs";
|
|
@@ -209,17 +182,14 @@ import {
|
|
|
209
182
|
minBy
|
|
210
183
|
} from "./chunk-IJD7FE2Z.mjs";
|
|
211
184
|
import {
|
|
212
|
-
|
|
213
|
-
} from "./chunk-
|
|
185
|
+
orderBy
|
|
186
|
+
} from "./chunk-7B7W36UP.mjs";
|
|
214
187
|
import {
|
|
215
|
-
|
|
216
|
-
} from "./chunk-
|
|
188
|
+
partition
|
|
189
|
+
} from "./chunk-DN3NOZ3H.mjs";
|
|
217
190
|
import {
|
|
218
191
|
flattenDeep
|
|
219
192
|
} from "./chunk-ML727RRJ.mjs";
|
|
220
|
-
import {
|
|
221
|
-
flatten
|
|
222
|
-
} from "./chunk-33MSBDC6.mjs";
|
|
223
193
|
import {
|
|
224
194
|
forEachRight
|
|
225
195
|
} from "./chunk-IEA53J7P.mjs";
|
|
@@ -230,11 +200,11 @@ import {
|
|
|
230
200
|
head
|
|
231
201
|
} from "./chunk-HM2JT2RX.mjs";
|
|
232
202
|
import {
|
|
233
|
-
|
|
234
|
-
} from "./chunk-
|
|
203
|
+
initial
|
|
204
|
+
} from "./chunk-XPSOKBRZ.mjs";
|
|
235
205
|
import {
|
|
236
|
-
|
|
237
|
-
} from "./chunk-
|
|
206
|
+
intersection
|
|
207
|
+
} from "./chunk-FVVSE2F2.mjs";
|
|
238
208
|
import {
|
|
239
209
|
differenceBy
|
|
240
210
|
} from "./chunk-LVWX5B43.mjs";
|
|
@@ -254,17 +224,47 @@ import {
|
|
|
254
224
|
dropWhile
|
|
255
225
|
} from "./chunk-LJ2C6MVP.mjs";
|
|
256
226
|
import {
|
|
257
|
-
|
|
258
|
-
} from "./chunk-
|
|
227
|
+
fill
|
|
228
|
+
} from "./chunk-YFN6KOC4.mjs";
|
|
259
229
|
import {
|
|
260
|
-
|
|
261
|
-
} from "./chunk-
|
|
230
|
+
flatMap
|
|
231
|
+
} from "./chunk-UY76KTPE.mjs";
|
|
232
|
+
import {
|
|
233
|
+
flatten
|
|
234
|
+
} from "./chunk-33MSBDC6.mjs";
|
|
262
235
|
import {
|
|
263
236
|
chunk
|
|
264
237
|
} from "./chunk-E6C5EZQA.mjs";
|
|
265
238
|
import {
|
|
266
239
|
compact
|
|
267
240
|
} from "./chunk-DTJJIMKJ.mjs";
|
|
241
|
+
import {
|
|
242
|
+
countBy
|
|
243
|
+
} from "./chunk-CRSKT4WW.mjs";
|
|
244
|
+
import {
|
|
245
|
+
difference
|
|
246
|
+
} from "./chunk-JPUKH67K.mjs";
|
|
247
|
+
import {
|
|
248
|
+
AbortError
|
|
249
|
+
} from "./chunk-DXB7EZUQ.mjs";
|
|
250
|
+
import {
|
|
251
|
+
TimeoutError
|
|
252
|
+
} from "./chunk-KIOYQRMQ.mjs";
|
|
253
|
+
import {
|
|
254
|
+
negate
|
|
255
|
+
} from "./chunk-BOOQBJN2.mjs";
|
|
256
|
+
import {
|
|
257
|
+
noop
|
|
258
|
+
} from "./chunk-LKXCOLNY.mjs";
|
|
259
|
+
import {
|
|
260
|
+
once
|
|
261
|
+
} from "./chunk-CMBC4MXG.mjs";
|
|
262
|
+
import {
|
|
263
|
+
throttle
|
|
264
|
+
} from "./chunk-QOJGMVVR.mjs";
|
|
265
|
+
import {
|
|
266
|
+
debounce
|
|
267
|
+
} from "./chunk-3IP4JVLL.mjs";
|
|
268
268
|
import {
|
|
269
269
|
__export
|
|
270
270
|
} from "./chunk-24FKGR6U.mjs";
|
|
@@ -595,4 +595,4 @@ export {
|
|
|
595
595
|
min,
|
|
596
596
|
compat_exports
|
|
597
597
|
};
|
|
598
|
-
//# sourceMappingURL=chunk-
|
|
598
|
+
//# sourceMappingURL=chunk-72G6BLM4.mjs.map
|
|
@@ -27,7 +27,9 @@ function clone(obj) {
|
|
|
27
27
|
return result;
|
|
28
28
|
}
|
|
29
29
|
if (typeof obj === "object") {
|
|
30
|
-
|
|
30
|
+
const prototype = Object.getPrototypeOf(obj);
|
|
31
|
+
const result = Object.create(prototype);
|
|
32
|
+
return Object.assign(result, obj);
|
|
31
33
|
}
|
|
32
34
|
return obj;
|
|
33
35
|
}
|
|
@@ -38,4 +40,4 @@ function isPrimitive(value) {
|
|
|
38
40
|
export {
|
|
39
41
|
clone
|
|
40
42
|
};
|
|
41
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-VRUTBJYS.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/object/clone.ts"],"sourcesContent":["/**\n * Creates a shallow clone of the given object.\n *\n * @template T - The type of the object.\n * @param {T} obj - The object to clone.\n * @returns {T} - A shallow clone of the given object.\n *\n * @example\n * // Clone a primitive values\n * const num = 29;\n * const clonedNum = clone(num);\n * console.log(clonedNum); // 29\n * console.log(clonedNum === num) ; // true\n *\n * @example\n * // Clone an array\n * const arr = [1, 2, 3];\n * const clonedArr = clone(arr);\n * console.log(clonedArr); // [1, 2, 3]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an object\n * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n * const clonedObj = clone(obj);\n * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n * console.log(clonedObj === obj); // false\n */\nexport function clone<T>(obj: T): T {\n if (isPrimitive(obj)) {\n return obj;\n }\n\n if (Array.isArray(obj)) {\n return obj.slice() as T;\n }\n\n if (obj instanceof Date) {\n return new Date(obj.getTime()) as T;\n }\n\n if (obj instanceof RegExp) {\n return new RegExp(obj.source, obj.flags) as T;\n }\n\n if (obj instanceof Map) {\n const result = new Map();\n for (const [key, value] of obj) {\n result.set(key, value);\n }\n return result as T;\n }\n\n if (obj instanceof Set) {\n const result = new Set();\n for (const value of obj) {\n result.add(value);\n }\n return result as T;\n }\n\n if (typeof obj ===
|
|
1
|
+
{"version":3,"sources":["../src/object/clone.ts"],"sourcesContent":["/**\n * Creates a shallow clone of the given object.\n *\n * @template T - The type of the object.\n * @param {T} obj - The object to clone.\n * @returns {T} - A shallow clone of the given object.\n *\n * @example\n * // Clone a primitive values\n * const num = 29;\n * const clonedNum = clone(num);\n * console.log(clonedNum); // 29\n * console.log(clonedNum === num) ; // true\n *\n * @example\n * // Clone an array\n * const arr = [1, 2, 3];\n * const clonedArr = clone(arr);\n * console.log(clonedArr); // [1, 2, 3]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an object\n * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n * const clonedObj = clone(obj);\n * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n * console.log(clonedObj === obj); // false\n */\nexport function clone<T>(obj: T): T {\n if (isPrimitive(obj)) {\n return obj;\n }\n\n if (Array.isArray(obj)) {\n return obj.slice() as T;\n }\n\n if (obj instanceof Date) {\n return new Date(obj.getTime()) as T;\n }\n\n if (obj instanceof RegExp) {\n return new RegExp(obj.source, obj.flags) as T;\n }\n\n if (obj instanceof Map) {\n const result = new Map();\n for (const [key, value] of obj) {\n result.set(key, value);\n }\n return result as T;\n }\n\n if (obj instanceof Set) {\n const result = new Set();\n for (const value of obj) {\n result.add(value);\n }\n return result as T;\n }\n\n if (typeof obj === 'object') {\n const prototype = Object.getPrototypeOf(obj);\n const result = Object.create(prototype)\n return Object.assign(result, obj);\n }\n return obj;\n}\n\ntype Primitive = null | undefined | string | number | boolean | symbol | bigint;\n\nfunction isPrimitive(value: unknown): value is Primitive {\n return value == null || (typeof value !== 'object' && typeof value !== 'function');\n}\n"],"mappings":";AA4BO,SAAS,MAAS,KAAW;AAClC,MAAI,YAAY,GAAG,GAAG;AACpB,WAAO;AAAA,EACT;AAEA,MAAI,MAAM,QAAQ,GAAG,GAAG;AACtB,WAAO,IAAI,MAAM;AAAA,EACnB;AAEA,MAAI,eAAe,MAAM;AACvB,WAAO,IAAI,KAAK,IAAI,QAAQ,CAAC;AAAA,EAC/B;AAEA,MAAI,eAAe,QAAQ;AACzB,WAAO,IAAI,OAAO,IAAI,QAAQ,IAAI,KAAK;AAAA,EACzC;AAEA,MAAI,eAAe,KAAK;AACtB,UAAM,SAAS,oBAAI,IAAI;AACvB,eAAW,CAAC,KAAK,KAAK,KAAK,KAAK;AAC9B,aAAO,IAAI,KAAK,KAAK;AAAA,IACvB;AACA,WAAO;AAAA,EACT;AAEA,MAAI,eAAe,KAAK;AACtB,UAAM,SAAS,oBAAI,IAAI;AACvB,eAAW,SAAS,KAAK;AACvB,aAAO,IAAI,KAAK;AAAA,IAClB;AACA,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,QAAQ,UAAU;AAC3B,UAAM,YAAY,OAAO,eAAe,GAAG;AAC3C,UAAM,SAAS,OAAO,OAAO,SAAS;AACtC,WAAO,OAAO,OAAO,QAAQ,GAAG;AAAA,EAClC;AACA,SAAO;AACT;AAIA,SAAS,YAAY,OAAoC;AACvD,SAAO,SAAS,QAAS,OAAO,UAAU,YAAY,OAAO,UAAU;AACzE;","names":[]}
|
package/dist/compat/index.js
CHANGED
|
@@ -921,7 +921,9 @@ function clone(obj) {
|
|
|
921
921
|
return result;
|
|
922
922
|
}
|
|
923
923
|
if (typeof obj === "object") {
|
|
924
|
-
|
|
924
|
+
const prototype = Object.getPrototypeOf(obj);
|
|
925
|
+
const result = Object.create(prototype);
|
|
926
|
+
return Object.assign(result, obj);
|
|
925
927
|
}
|
|
926
928
|
return obj;
|
|
927
929
|
}
|