@visulima/deep-clone 2.1.7 → 2.1.8
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/CHANGELOG.md +10 -0
- package/dist/handler.cjs +32 -1
- package/dist/handler.mjs +10 -1
- package/dist/index.cjs +121 -1
- package/dist/index.mjs +117 -1
- package/dist/packem_shared/copyArrayBuffer-ClXU6N_V.mjs +34 -0
- package/dist/packem_shared/copyArrayBuffer-RMfO5nNu.cjs +36 -0
- package/dist/packem_shared/copyArrayLoose-DutO2eEt.mjs +19 -0
- package/dist/packem_shared/copyArrayLoose-jv5B0O8W.cjs +24 -0
- package/dist/packem_shared/copyBlob-B8SnIatQ.cjs +7 -0
- package/dist/packem_shared/copyBlob-ChzBsdC1.mjs +5 -0
- package/dist/packem_shared/copyDataView-BfhmLiTi.cjs +9 -0
- package/dist/packem_shared/copyDataView-xL-RicuC.mjs +7 -0
- package/dist/packem_shared/copyDate-Bgbm3mwe.mjs +5 -0
- package/dist/packem_shared/copyDate-CSIVko_l.cjs +7 -0
- package/dist/packem_shared/copyError-8k5J3dj4.mjs +22 -0
- package/dist/packem_shared/copyError-C1oK1eBT.cjs +24 -0
- package/dist/packem_shared/copyMapLoose-6OISt6H6.mjs +15 -0
- package/dist/packem_shared/copyMapLoose-DpoR0LmV.cjs +20 -0
- package/dist/packem_shared/copyObjectLoose-C0Xe4P0E.mjs +47 -0
- package/dist/packem_shared/copyObjectLoose-PHaYRVaE.cjs +52 -0
- package/dist/packem_shared/copyOwnProperties-FDDRgAnK.mjs +30 -0
- package/dist/packem_shared/copyOwnProperties-NdANNH2P.cjs +32 -0
- package/dist/packem_shared/copyRegExpLoose-455kIpwH.cjs +20 -0
- package/dist/packem_shared/copyRegExpLoose-CPAMvOoY.mjs +15 -0
- package/dist/packem_shared/copySetLoose-BBgAFOdx.cjs +20 -0
- package/dist/packem_shared/copySetLoose-BIxHjmWz.mjs +15 -0
- package/dist/packem_shared/getCleanClone-BhfRMqgx.cjs +22 -0
- package/dist/packem_shared/getCleanClone-Ch3gqIzM.mjs +20 -0
- package/dist/utils.cjs +11 -1
- package/dist/utils.mjs +2 -1
- package/package.json +10 -10
- package/dist/packem_shared/copyArrayBuffer-CErFt6r1.cjs +0 -1
- package/dist/packem_shared/copyArrayBuffer-hX6Bv2Yc.mjs +0 -1
- package/dist/packem_shared/copyArrayLoose-B2xEXxZi.mjs +0 -1
- package/dist/packem_shared/copyArrayLoose-ukX__AC4.cjs +0 -1
- package/dist/packem_shared/copyBlob-CCIQ88PB.cjs +0 -1
- package/dist/packem_shared/copyBlob-zWtjc8BU.mjs +0 -1
- package/dist/packem_shared/copyDataView-C9SuIdXo.cjs +0 -1
- package/dist/packem_shared/copyDataView-CHZxqd6h.mjs +0 -1
- package/dist/packem_shared/copyDate-CSebYDy0.mjs +0 -1
- package/dist/packem_shared/copyDate-CfZZ3WAO.cjs +0 -1
- package/dist/packem_shared/copyError-BzQAysGw.mjs +0 -1
- package/dist/packem_shared/copyError-DGbUXsSU.cjs +0 -1
- package/dist/packem_shared/copyMapLoose-CorlUnMI.mjs +0 -1
- package/dist/packem_shared/copyMapLoose-CuTK-fBO.cjs +0 -1
- package/dist/packem_shared/copyObjectLoose-CbVJDz5e.cjs +0 -1
- package/dist/packem_shared/copyObjectLoose-DrrTtApt.mjs +0 -1
- package/dist/packem_shared/copyOwnProperties-QEhjt2x8.mjs +0 -1
- package/dist/packem_shared/copyOwnProperties-Zk6Vg6Oe.cjs +0 -1
- package/dist/packem_shared/copyRegExpLoose-BvCnMoGQ.mjs +0 -1
- package/dist/packem_shared/copyRegExpLoose-DzJvEX_n.cjs +0 -1
- package/dist/packem_shared/copySetLoose-FGAEcE9e.mjs +0 -1
- package/dist/packem_shared/copySetLoose-v1Cjaq91.cjs +0 -1
- package/dist/packem_shared/getCleanClone-D0FN9QGR.mjs +0 -1
- package/dist/packem_shared/getCleanClone-DLZ_E9xd.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## @visulima/deep-clone [2.1.8](https://github.com/visulima/visulima/compare/@visulima/deep-clone@2.1.7...@visulima/deep-clone@2.1.8) (2025-01-12)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* updated @visulima/packem, and all other dev dependencies ([7797a1c](https://github.com/visulima/visulima/commit/7797a1c3e6f1fc532895247bd88285a8a9883c40))
|
|
6
|
+
|
|
7
|
+
### Miscellaneous Chores
|
|
8
|
+
|
|
9
|
+
* updated dev dependencies ([9de2eab](https://github.com/visulima/visulima/commit/9de2eab91e95c8b9289d12f863a5167218770650))
|
|
10
|
+
|
|
1
11
|
## @visulima/deep-clone [2.1.7](https://github.com/visulima/visulima/compare/@visulima/deep-clone@2.1.6...@visulima/deep-clone@2.1.7) (2024-12-12)
|
|
2
12
|
|
|
3
13
|
### Bug Fixes
|
package/dist/handler.cjs
CHANGED
|
@@ -1 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const copyArrayLoose = require('./packem_shared/copyArrayLoose-jv5B0O8W.cjs');
|
|
6
|
+
const copyArrayBuffer = require('./packem_shared/copyArrayBuffer-RMfO5nNu.cjs');
|
|
7
|
+
const copyBlob = require('./packem_shared/copyBlob-B8SnIatQ.cjs');
|
|
8
|
+
const copyDataView = require('./packem_shared/copyDataView-BfhmLiTi.cjs');
|
|
9
|
+
const copyDate = require('./packem_shared/copyDate-CSIVko_l.cjs');
|
|
10
|
+
const copyError = require('./packem_shared/copyError-C1oK1eBT.cjs');
|
|
11
|
+
const copyMapLoose = require('./packem_shared/copyMapLoose-DpoR0LmV.cjs');
|
|
12
|
+
const copyObjectLoose = require('./packem_shared/copyObjectLoose-PHaYRVaE.cjs');
|
|
13
|
+
const copyRegExpLoose = require('./packem_shared/copyRegExpLoose-455kIpwH.cjs');
|
|
14
|
+
const copySetLoose = require('./packem_shared/copySetLoose-BBgAFOdx.cjs');
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
exports.copyArrayLoose = copyArrayLoose.copyArrayLoose;
|
|
19
|
+
exports.copyArrayStrict = copyArrayLoose.copyArrayStrict;
|
|
20
|
+
exports.copyArrayBuffer = copyArrayBuffer;
|
|
21
|
+
exports.copyBlob = copyBlob;
|
|
22
|
+
exports.copyDataView = copyDataView;
|
|
23
|
+
exports.copyDate = copyDate;
|
|
24
|
+
exports.copyError = copyError;
|
|
25
|
+
exports.copyMapLoose = copyMapLoose.copyMapLoose;
|
|
26
|
+
exports.copyMapStrict = copyMapLoose.copyMapStrict;
|
|
27
|
+
exports.copyObjectLoose = copyObjectLoose.copyObjectLoose;
|
|
28
|
+
exports.copyObjectStrict = copyObjectLoose.copyObjectStrict;
|
|
29
|
+
exports.copyRegExpLoose = copyRegExpLoose.copyRegExpLoose;
|
|
30
|
+
exports.copyRegExpStrict = copyRegExpLoose.copyRegExpStrict;
|
|
31
|
+
exports.copySetLoose = copySetLoose.copySetLoose;
|
|
32
|
+
exports.copySetStrict = copySetLoose.copySetStrict;
|
package/dist/handler.mjs
CHANGED
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
export { copyArrayLoose, copyArrayStrict } from './packem_shared/copyArrayLoose-DutO2eEt.mjs';
|
|
2
|
+
export { default as copyArrayBuffer } from './packem_shared/copyArrayBuffer-ClXU6N_V.mjs';
|
|
3
|
+
export { default as copyBlob } from './packem_shared/copyBlob-ChzBsdC1.mjs';
|
|
4
|
+
export { default as copyDataView } from './packem_shared/copyDataView-xL-RicuC.mjs';
|
|
5
|
+
export { default as copyDate } from './packem_shared/copyDate-Bgbm3mwe.mjs';
|
|
6
|
+
export { default as copyError } from './packem_shared/copyError-8k5J3dj4.mjs';
|
|
7
|
+
export { copyMapLoose, copyMapStrict } from './packem_shared/copyMapLoose-6OISt6H6.mjs';
|
|
8
|
+
export { copyObjectLoose, copyObjectStrict } from './packem_shared/copyObjectLoose-C0Xe4P0E.mjs';
|
|
9
|
+
export { copyRegExpLoose, copyRegExpStrict } from './packem_shared/copyRegExpLoose-CPAMvOoY.mjs';
|
|
10
|
+
export { copySetLoose, copySetStrict } from './packem_shared/copySetLoose-BIxHjmWz.mjs';
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1,121 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const copyArrayLoose = require('./packem_shared/copyArrayLoose-jv5B0O8W.cjs');
|
|
6
|
+
const copyArrayBuffer = require('./packem_shared/copyArrayBuffer-RMfO5nNu.cjs');
|
|
7
|
+
const copyBlob = require('./packem_shared/copyBlob-B8SnIatQ.cjs');
|
|
8
|
+
const copyDataView = require('./packem_shared/copyDataView-BfhmLiTi.cjs');
|
|
9
|
+
const copyDate = require('./packem_shared/copyDate-CSIVko_l.cjs');
|
|
10
|
+
const copyError = require('./packem_shared/copyError-C1oK1eBT.cjs');
|
|
11
|
+
const copyMapLoose = require('./packem_shared/copyMapLoose-DpoR0LmV.cjs');
|
|
12
|
+
const copyObjectLoose = require('./packem_shared/copyObjectLoose-PHaYRVaE.cjs');
|
|
13
|
+
const copyRegExpLoose = require('./packem_shared/copyRegExpLoose-455kIpwH.cjs');
|
|
14
|
+
const copySetLoose = require('./packem_shared/copySetLoose-BBgAFOdx.cjs');
|
|
15
|
+
|
|
16
|
+
var __defProp = Object.defineProperty;
|
|
17
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
18
|
+
const canValueHaveProperties = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null || typeof value === "function", "canValueHaveProperties");
|
|
19
|
+
const handlers = {
|
|
20
|
+
Array: copyArrayLoose.copyArrayLoose,
|
|
21
|
+
ArrayBuffer: copyArrayBuffer,
|
|
22
|
+
Blob: copyBlob,
|
|
23
|
+
DataView: copyDataView,
|
|
24
|
+
Date: copyDate,
|
|
25
|
+
Error: copyError,
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/ban-types,@typescript-eslint/no-unused-vars
|
|
27
|
+
Function: /* @__PURE__ */ __name((object, _state) => object, "Function"),
|
|
28
|
+
Map: copyMapLoose.copyMapLoose,
|
|
29
|
+
Object: copyObjectLoose.copyObjectLoose,
|
|
30
|
+
Promise: /* @__PURE__ */ __name((object) => {
|
|
31
|
+
throw new TypeError(`${object.constructor.name} objects cannot be cloned`);
|
|
32
|
+
}, "Promise"),
|
|
33
|
+
RegExp: copyRegExpLoose.copyRegExpLoose,
|
|
34
|
+
Set: copySetLoose.copySetLoose,
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36
|
+
SharedArrayBuffer: /* @__PURE__ */ __name((object, _state) => {
|
|
37
|
+
throw new TypeError(`${object.constructor.name} objects cannot be cloned`);
|
|
38
|
+
}, "SharedArrayBuffer"),
|
|
39
|
+
WeakMap: /* @__PURE__ */ __name((object) => {
|
|
40
|
+
throw new TypeError(`${object.constructor.name} objects cannot be cloned`);
|
|
41
|
+
}, "WeakMap"),
|
|
42
|
+
WeakSet: /* @__PURE__ */ __name((object) => {
|
|
43
|
+
throw new TypeError(`${object.constructor.name} objects cannot be cloned`);
|
|
44
|
+
}, "WeakSet")
|
|
45
|
+
};
|
|
46
|
+
const deepClone = /* @__PURE__ */ __name((originalData, options) => {
|
|
47
|
+
if (!canValueHaveProperties(originalData)) {
|
|
48
|
+
return originalData;
|
|
49
|
+
}
|
|
50
|
+
const cloner = {
|
|
51
|
+
...handlers,
|
|
52
|
+
...options?.strict ? { Array: copyArrayLoose.copyArrayStrict, Map: copyMapLoose.copyMapStrict, Object: copyObjectLoose.copyObjectStrict, RegExp: copyRegExpLoose.copyRegExpStrict, Set: copySetLoose.copySetStrict } : {},
|
|
53
|
+
...options?.handler
|
|
54
|
+
};
|
|
55
|
+
let cache = /* @__PURE__ */ new WeakMap();
|
|
56
|
+
const clone = /* @__PURE__ */ __name((value, state) => {
|
|
57
|
+
if (!canValueHaveProperties(value)) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
if (state.cache.has(value)) {
|
|
61
|
+
return state.cache.get(value);
|
|
62
|
+
}
|
|
63
|
+
if (Array.isArray(value)) {
|
|
64
|
+
return cloner.Array(value, state);
|
|
65
|
+
}
|
|
66
|
+
if (typeof value === "object" && value.constructor === Object && value.nodeType === undefined) {
|
|
67
|
+
return cloner.Object(value, state);
|
|
68
|
+
}
|
|
69
|
+
if (value.nodeType !== undefined && value.cloneNode !== undefined) {
|
|
70
|
+
return value.cloneNode(true);
|
|
71
|
+
}
|
|
72
|
+
if (value instanceof Date) {
|
|
73
|
+
return cloner.Date(value, state);
|
|
74
|
+
}
|
|
75
|
+
if (value instanceof RegExp) {
|
|
76
|
+
return cloner.RegExp(value, state);
|
|
77
|
+
}
|
|
78
|
+
if (value instanceof Map) {
|
|
79
|
+
return cloner.Map(value, state);
|
|
80
|
+
}
|
|
81
|
+
if (value instanceof Set) {
|
|
82
|
+
return cloner.Set(value, state);
|
|
83
|
+
}
|
|
84
|
+
if (value instanceof Error) {
|
|
85
|
+
return cloner.Error(value, state);
|
|
86
|
+
}
|
|
87
|
+
if (value instanceof ArrayBuffer || value instanceof Uint8Array || value instanceof Uint8ClampedArray || value instanceof Int8Array || value instanceof Uint16Array || value instanceof Int16Array || value instanceof Uint32Array || value instanceof Int32Array || value instanceof Float32Array || value instanceof Float64Array) {
|
|
88
|
+
return cloner.ArrayBuffer(value, state);
|
|
89
|
+
}
|
|
90
|
+
if (value instanceof Blob) {
|
|
91
|
+
return cloner.Blob(value, state);
|
|
92
|
+
}
|
|
93
|
+
if (value instanceof DataView) {
|
|
94
|
+
return cloner.DataView(value, state);
|
|
95
|
+
}
|
|
96
|
+
if (value instanceof SharedArrayBuffer) {
|
|
97
|
+
return cloner.SharedArrayBuffer(value, state);
|
|
98
|
+
}
|
|
99
|
+
if (value instanceof Promise) {
|
|
100
|
+
return cloner.Promise(value, state);
|
|
101
|
+
}
|
|
102
|
+
if (value instanceof WeakMap) {
|
|
103
|
+
return cloner.WeakMap(value, state);
|
|
104
|
+
}
|
|
105
|
+
if (value instanceof WeakSet) {
|
|
106
|
+
return cloner.WeakSet(value, state);
|
|
107
|
+
}
|
|
108
|
+
if (value instanceof Function) {
|
|
109
|
+
return cloner.Function(value, state);
|
|
110
|
+
}
|
|
111
|
+
if (typeof value === "object") {
|
|
112
|
+
return cloner.Object(value, state);
|
|
113
|
+
}
|
|
114
|
+
throw new TypeError(`Type of ${typeof value} cannot be cloned`, value);
|
|
115
|
+
}, "clone");
|
|
116
|
+
const cloned = clone(originalData, { cache, clone });
|
|
117
|
+
cache = null;
|
|
118
|
+
return cloned;
|
|
119
|
+
}, "deepClone");
|
|
120
|
+
|
|
121
|
+
exports.deepClone = deepClone;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1,117 @@
|
|
|
1
|
-
|
|
1
|
+
import { copyArrayStrict, copyArrayLoose } from './packem_shared/copyArrayLoose-DutO2eEt.mjs';
|
|
2
|
+
import copyArrayBuffer from './packem_shared/copyArrayBuffer-ClXU6N_V.mjs';
|
|
3
|
+
import copyBlob from './packem_shared/copyBlob-ChzBsdC1.mjs';
|
|
4
|
+
import copyDataView from './packem_shared/copyDataView-xL-RicuC.mjs';
|
|
5
|
+
import copyDate from './packem_shared/copyDate-Bgbm3mwe.mjs';
|
|
6
|
+
import copyError from './packem_shared/copyError-8k5J3dj4.mjs';
|
|
7
|
+
import { copyMapStrict, copyMapLoose } from './packem_shared/copyMapLoose-6OISt6H6.mjs';
|
|
8
|
+
import { copyObjectStrict, copyObjectLoose } from './packem_shared/copyObjectLoose-C0Xe4P0E.mjs';
|
|
9
|
+
import { copyRegExpStrict, copyRegExpLoose } from './packem_shared/copyRegExpLoose-CPAMvOoY.mjs';
|
|
10
|
+
import { copySetStrict, copySetLoose } from './packem_shared/copySetLoose-BIxHjmWz.mjs';
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
14
|
+
const canValueHaveProperties = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null || typeof value === "function", "canValueHaveProperties");
|
|
15
|
+
const handlers = {
|
|
16
|
+
Array: copyArrayLoose,
|
|
17
|
+
ArrayBuffer: copyArrayBuffer,
|
|
18
|
+
Blob: copyBlob,
|
|
19
|
+
DataView: copyDataView,
|
|
20
|
+
Date: copyDate,
|
|
21
|
+
Error: copyError,
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/ban-types,@typescript-eslint/no-unused-vars
|
|
23
|
+
Function: /* @__PURE__ */ __name((object, _state) => object, "Function"),
|
|
24
|
+
Map: copyMapLoose,
|
|
25
|
+
Object: copyObjectLoose,
|
|
26
|
+
Promise: /* @__PURE__ */ __name((object) => {
|
|
27
|
+
throw new TypeError(`${object.constructor.name} objects cannot be cloned`);
|
|
28
|
+
}, "Promise"),
|
|
29
|
+
RegExp: copyRegExpLoose,
|
|
30
|
+
Set: copySetLoose,
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
32
|
+
SharedArrayBuffer: /* @__PURE__ */ __name((object, _state) => {
|
|
33
|
+
throw new TypeError(`${object.constructor.name} objects cannot be cloned`);
|
|
34
|
+
}, "SharedArrayBuffer"),
|
|
35
|
+
WeakMap: /* @__PURE__ */ __name((object) => {
|
|
36
|
+
throw new TypeError(`${object.constructor.name} objects cannot be cloned`);
|
|
37
|
+
}, "WeakMap"),
|
|
38
|
+
WeakSet: /* @__PURE__ */ __name((object) => {
|
|
39
|
+
throw new TypeError(`${object.constructor.name} objects cannot be cloned`);
|
|
40
|
+
}, "WeakSet")
|
|
41
|
+
};
|
|
42
|
+
const deepClone = /* @__PURE__ */ __name((originalData, options) => {
|
|
43
|
+
if (!canValueHaveProperties(originalData)) {
|
|
44
|
+
return originalData;
|
|
45
|
+
}
|
|
46
|
+
const cloner = {
|
|
47
|
+
...handlers,
|
|
48
|
+
...options?.strict ? { Array: copyArrayStrict, Map: copyMapStrict, Object: copyObjectStrict, RegExp: copyRegExpStrict, Set: copySetStrict } : {},
|
|
49
|
+
...options?.handler
|
|
50
|
+
};
|
|
51
|
+
let cache = /* @__PURE__ */ new WeakMap();
|
|
52
|
+
const clone = /* @__PURE__ */ __name((value, state) => {
|
|
53
|
+
if (!canValueHaveProperties(value)) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
if (state.cache.has(value)) {
|
|
57
|
+
return state.cache.get(value);
|
|
58
|
+
}
|
|
59
|
+
if (Array.isArray(value)) {
|
|
60
|
+
return cloner.Array(value, state);
|
|
61
|
+
}
|
|
62
|
+
if (typeof value === "object" && value.constructor === Object && value.nodeType === undefined) {
|
|
63
|
+
return cloner.Object(value, state);
|
|
64
|
+
}
|
|
65
|
+
if (value.nodeType !== undefined && value.cloneNode !== undefined) {
|
|
66
|
+
return value.cloneNode(true);
|
|
67
|
+
}
|
|
68
|
+
if (value instanceof Date) {
|
|
69
|
+
return cloner.Date(value, state);
|
|
70
|
+
}
|
|
71
|
+
if (value instanceof RegExp) {
|
|
72
|
+
return cloner.RegExp(value, state);
|
|
73
|
+
}
|
|
74
|
+
if (value instanceof Map) {
|
|
75
|
+
return cloner.Map(value, state);
|
|
76
|
+
}
|
|
77
|
+
if (value instanceof Set) {
|
|
78
|
+
return cloner.Set(value, state);
|
|
79
|
+
}
|
|
80
|
+
if (value instanceof Error) {
|
|
81
|
+
return cloner.Error(value, state);
|
|
82
|
+
}
|
|
83
|
+
if (value instanceof ArrayBuffer || value instanceof Uint8Array || value instanceof Uint8ClampedArray || value instanceof Int8Array || value instanceof Uint16Array || value instanceof Int16Array || value instanceof Uint32Array || value instanceof Int32Array || value instanceof Float32Array || value instanceof Float64Array) {
|
|
84
|
+
return cloner.ArrayBuffer(value, state);
|
|
85
|
+
}
|
|
86
|
+
if (value instanceof Blob) {
|
|
87
|
+
return cloner.Blob(value, state);
|
|
88
|
+
}
|
|
89
|
+
if (value instanceof DataView) {
|
|
90
|
+
return cloner.DataView(value, state);
|
|
91
|
+
}
|
|
92
|
+
if (value instanceof SharedArrayBuffer) {
|
|
93
|
+
return cloner.SharedArrayBuffer(value, state);
|
|
94
|
+
}
|
|
95
|
+
if (value instanceof Promise) {
|
|
96
|
+
return cloner.Promise(value, state);
|
|
97
|
+
}
|
|
98
|
+
if (value instanceof WeakMap) {
|
|
99
|
+
return cloner.WeakMap(value, state);
|
|
100
|
+
}
|
|
101
|
+
if (value instanceof WeakSet) {
|
|
102
|
+
return cloner.WeakSet(value, state);
|
|
103
|
+
}
|
|
104
|
+
if (value instanceof Function) {
|
|
105
|
+
return cloner.Function(value, state);
|
|
106
|
+
}
|
|
107
|
+
if (typeof value === "object") {
|
|
108
|
+
return cloner.Object(value, state);
|
|
109
|
+
}
|
|
110
|
+
throw new TypeError(`Type of ${typeof value} cannot be cloned`, value);
|
|
111
|
+
}, "clone");
|
|
112
|
+
const cloned = clone(originalData, { cache, clone });
|
|
113
|
+
cache = null;
|
|
114
|
+
return cloned;
|
|
115
|
+
}, "deepClone");
|
|
116
|
+
|
|
117
|
+
export { deepClone };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
const copyArrayBuffer = /* @__PURE__ */ __name((arrayBuffer) => {
|
|
4
|
+
const typeHandlers = {
|
|
5
|
+
BigInt64Array,
|
|
6
|
+
BigUint64Array,
|
|
7
|
+
// @ts-expect-error - Buffer has no constructor
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
9
|
+
Buffer: Buffer.from,
|
|
10
|
+
Float32Array,
|
|
11
|
+
Float64Array,
|
|
12
|
+
Int8Array,
|
|
13
|
+
Int16Array,
|
|
14
|
+
Int32Array,
|
|
15
|
+
Uint8Array,
|
|
16
|
+
Uint8ClampedArray,
|
|
17
|
+
Uint16Array,
|
|
18
|
+
Uint32Array
|
|
19
|
+
};
|
|
20
|
+
if (arrayBuffer instanceof ArrayBuffer) {
|
|
21
|
+
const newBuffer = new ArrayBuffer(arrayBuffer.byteLength);
|
|
22
|
+
const origView = new Uint8Array(arrayBuffer);
|
|
23
|
+
const newView = new Uint8Array(newBuffer);
|
|
24
|
+
newView.set(origView);
|
|
25
|
+
return newBuffer;
|
|
26
|
+
}
|
|
27
|
+
const Ctor = typeHandlers[arrayBuffer.constructor.name] ?? undefined;
|
|
28
|
+
if (Ctor) {
|
|
29
|
+
return new Ctor(arrayBuffer);
|
|
30
|
+
}
|
|
31
|
+
return new arrayBuffer.constructor([...arrayBuffer.buffer], arrayBuffer.byteOffset, arrayBuffer.length);
|
|
32
|
+
}, "copyArrayBuffer");
|
|
33
|
+
|
|
34
|
+
export { copyArrayBuffer as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
const copyArrayBuffer = /* @__PURE__ */ __name((arrayBuffer) => {
|
|
6
|
+
const typeHandlers = {
|
|
7
|
+
BigInt64Array,
|
|
8
|
+
BigUint64Array,
|
|
9
|
+
// @ts-expect-error - Buffer has no constructor
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
11
|
+
Buffer: Buffer.from,
|
|
12
|
+
Float32Array,
|
|
13
|
+
Float64Array,
|
|
14
|
+
Int8Array,
|
|
15
|
+
Int16Array,
|
|
16
|
+
Int32Array,
|
|
17
|
+
Uint8Array,
|
|
18
|
+
Uint8ClampedArray,
|
|
19
|
+
Uint16Array,
|
|
20
|
+
Uint32Array
|
|
21
|
+
};
|
|
22
|
+
if (arrayBuffer instanceof ArrayBuffer) {
|
|
23
|
+
const newBuffer = new ArrayBuffer(arrayBuffer.byteLength);
|
|
24
|
+
const origView = new Uint8Array(arrayBuffer);
|
|
25
|
+
const newView = new Uint8Array(newBuffer);
|
|
26
|
+
newView.set(origView);
|
|
27
|
+
return newBuffer;
|
|
28
|
+
}
|
|
29
|
+
const Ctor = typeHandlers[arrayBuffer.constructor.name] ?? undefined;
|
|
30
|
+
if (Ctor) {
|
|
31
|
+
return new Ctor(arrayBuffer);
|
|
32
|
+
}
|
|
33
|
+
return new arrayBuffer.constructor([...arrayBuffer.buffer], arrayBuffer.byteOffset, arrayBuffer.length);
|
|
34
|
+
}, "copyArrayBuffer");
|
|
35
|
+
|
|
36
|
+
module.exports = copyArrayBuffer;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import copyOwnProperties from './copyOwnProperties-FDDRgAnK.mjs';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
const copyArrayLoose = /* @__PURE__ */ __name((array, state) => {
|
|
6
|
+
const clone = [];
|
|
7
|
+
state.cache.set(array, clone);
|
|
8
|
+
for (let index = 0, { length } = array; index < length; ++index) {
|
|
9
|
+
clone[index] = state.clone(array[index], state);
|
|
10
|
+
}
|
|
11
|
+
return clone;
|
|
12
|
+
}, "copyArrayLoose");
|
|
13
|
+
const copyArrayStrict = /* @__PURE__ */ __name((array, state) => {
|
|
14
|
+
const clone = [];
|
|
15
|
+
state.cache.set(array, clone);
|
|
16
|
+
return copyOwnProperties(array, clone, state);
|
|
17
|
+
}, "copyArrayStrict");
|
|
18
|
+
|
|
19
|
+
export { copyArrayLoose, copyArrayStrict };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const copyOwnProperties = require('./copyOwnProperties-NdANNH2P.cjs');
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
+
const copyArrayLoose = /* @__PURE__ */ __name((array, state) => {
|
|
10
|
+
const clone = [];
|
|
11
|
+
state.cache.set(array, clone);
|
|
12
|
+
for (let index = 0, { length } = array; index < length; ++index) {
|
|
13
|
+
clone[index] = state.clone(array[index], state);
|
|
14
|
+
}
|
|
15
|
+
return clone;
|
|
16
|
+
}, "copyArrayLoose");
|
|
17
|
+
const copyArrayStrict = /* @__PURE__ */ __name((array, state) => {
|
|
18
|
+
const clone = [];
|
|
19
|
+
state.cache.set(array, clone);
|
|
20
|
+
return copyOwnProperties(array, clone, state);
|
|
21
|
+
}, "copyArrayStrict");
|
|
22
|
+
|
|
23
|
+
exports.copyArrayLoose = copyArrayLoose;
|
|
24
|
+
exports.copyArrayStrict = copyArrayStrict;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
const copyBlob = /* @__PURE__ */ __name((blob) => blob.slice(0, blob.size, blob.type), "copyBlob");
|
|
6
|
+
|
|
7
|
+
module.exports = copyBlob;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const copyArrayBuffer = require('./copyArrayBuffer-RMfO5nNu.cjs');
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
const copyDataView = /* @__PURE__ */ __name((dataView) => new DataView(copyArrayBuffer(dataView.buffer)), "copyDataView");
|
|
8
|
+
|
|
9
|
+
module.exports = copyDataView;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import copyArrayBuffer from './copyArrayBuffer-ClXU6N_V.mjs';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
const copyDataView = /* @__PURE__ */ __name((dataView) => new DataView(copyArrayBuffer(dataView.buffer)), "copyDataView");
|
|
6
|
+
|
|
7
|
+
export { copyDataView as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
const copyDate = /* @__PURE__ */ __name((date) => new Date(date.getTime()), "copyDate");
|
|
6
|
+
|
|
7
|
+
module.exports = copyDate;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import copyOwnProperties from './copyOwnProperties-FDDRgAnK.mjs';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
const copyError = /* @__PURE__ */ __name((object, state) => {
|
|
6
|
+
const error = new object.constructor(object.message);
|
|
7
|
+
if (object.stack) {
|
|
8
|
+
error.stack = object.stack;
|
|
9
|
+
}
|
|
10
|
+
if (object.code) {
|
|
11
|
+
error.code = object.code;
|
|
12
|
+
}
|
|
13
|
+
if (object.errno) {
|
|
14
|
+
error.errno = object.errno;
|
|
15
|
+
}
|
|
16
|
+
if (object.syscall) {
|
|
17
|
+
error.syscall = object.syscall;
|
|
18
|
+
}
|
|
19
|
+
return copyOwnProperties(object, error, state);
|
|
20
|
+
}, "copyError");
|
|
21
|
+
|
|
22
|
+
export { copyError as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const copyOwnProperties = require('./copyOwnProperties-NdANNH2P.cjs');
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
const copyError = /* @__PURE__ */ __name((object, state) => {
|
|
8
|
+
const error = new object.constructor(object.message);
|
|
9
|
+
if (object.stack) {
|
|
10
|
+
error.stack = object.stack;
|
|
11
|
+
}
|
|
12
|
+
if (object.code) {
|
|
13
|
+
error.code = object.code;
|
|
14
|
+
}
|
|
15
|
+
if (object.errno) {
|
|
16
|
+
error.errno = object.errno;
|
|
17
|
+
}
|
|
18
|
+
if (object.syscall) {
|
|
19
|
+
error.syscall = object.syscall;
|
|
20
|
+
}
|
|
21
|
+
return copyOwnProperties(object, error, state);
|
|
22
|
+
}, "copyError");
|
|
23
|
+
|
|
24
|
+
module.exports = copyError;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import copyOwnProperties from './copyOwnProperties-FDDRgAnK.mjs';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
const copyMapLoose = /* @__PURE__ */ __name((map, state) => {
|
|
6
|
+
const clone = /* @__PURE__ */ new Map();
|
|
7
|
+
state.cache.set(map, clone);
|
|
8
|
+
map.forEach((value, key) => {
|
|
9
|
+
clone.set(key, state.clone(value, state));
|
|
10
|
+
});
|
|
11
|
+
return clone;
|
|
12
|
+
}, "copyMapLoose");
|
|
13
|
+
const copyMapStrict = /* @__PURE__ */ __name((map, state) => copyOwnProperties(map, copyMapLoose(map, state), state), "copyMapStrict");
|
|
14
|
+
|
|
15
|
+
export { copyMapLoose, copyMapStrict };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const copyOwnProperties = require('./copyOwnProperties-NdANNH2P.cjs');
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
+
const copyMapLoose = /* @__PURE__ */ __name((map, state) => {
|
|
10
|
+
const clone = /* @__PURE__ */ new Map();
|
|
11
|
+
state.cache.set(map, clone);
|
|
12
|
+
map.forEach((value, key) => {
|
|
13
|
+
clone.set(key, state.clone(value, state));
|
|
14
|
+
});
|
|
15
|
+
return clone;
|
|
16
|
+
}, "copyMapLoose");
|
|
17
|
+
const copyMapStrict = /* @__PURE__ */ __name((map, state) => copyOwnProperties(map, copyMapLoose(map, state), state), "copyMapStrict");
|
|
18
|
+
|
|
19
|
+
exports.copyMapLoose = copyMapLoose;
|
|
20
|
+
exports.copyMapStrict = copyMapStrict;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import copyOwnProperties from './copyOwnProperties-FDDRgAnK.mjs';
|
|
2
|
+
import getCleanClone from './getCleanClone-Ch3gqIzM.mjs';
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
const copyObjectIsFunctions = /* @__PURE__ */ __name((object, clone) => {
|
|
7
|
+
if (!Object.isExtensible(object)) {
|
|
8
|
+
Object.preventExtensions(clone);
|
|
9
|
+
}
|
|
10
|
+
if (Object.isSealed(object)) {
|
|
11
|
+
Object.seal(clone);
|
|
12
|
+
}
|
|
13
|
+
if (Object.isFrozen(object)) {
|
|
14
|
+
Object.freeze(clone);
|
|
15
|
+
}
|
|
16
|
+
}, "copyObjectIsFunctions");
|
|
17
|
+
const copyObjectLoose = /* @__PURE__ */ __name((object, state) => {
|
|
18
|
+
const clone = getCleanClone(object);
|
|
19
|
+
state.cache.set(object, clone);
|
|
20
|
+
for (const key in object) {
|
|
21
|
+
if (Object.hasOwnProperty.call(object, key)) {
|
|
22
|
+
clone[key] = state.clone(object[key], state);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const symbols = Object.getOwnPropertySymbols(object);
|
|
26
|
+
for (let index = 0, { length } = symbols, symbol; index < length; ++index) {
|
|
27
|
+
symbol = symbols[index];
|
|
28
|
+
if (Object.prototype.propertyIsEnumerable.call(object, symbol)) {
|
|
29
|
+
clone[symbol] = state.clone(object[symbol], state);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
copyObjectIsFunctions(object, clone);
|
|
33
|
+
return clone;
|
|
34
|
+
}, "copyObjectLoose");
|
|
35
|
+
const copyObjectStrict = /* @__PURE__ */ __name((object, state) => {
|
|
36
|
+
const clone = getCleanClone(object);
|
|
37
|
+
state.cache.set(object, clone);
|
|
38
|
+
const clonedObject = copyOwnProperties(object, clone, state);
|
|
39
|
+
const objectPrototype = Object.getPrototypeOf(object);
|
|
40
|
+
if (Object.getPrototypeOf(clonedObject) !== objectPrototype) {
|
|
41
|
+
Object.setPrototypeOf(clonedObject, objectPrototype);
|
|
42
|
+
}
|
|
43
|
+
copyObjectIsFunctions(object, clone);
|
|
44
|
+
return clonedObject;
|
|
45
|
+
}, "copyObjectStrict");
|
|
46
|
+
|
|
47
|
+
export { copyObjectLoose, copyObjectStrict };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const copyOwnProperties = require('./copyOwnProperties-NdANNH2P.cjs');
|
|
6
|
+
const getCleanClone = require('./getCleanClone-BhfRMqgx.cjs');
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
|
+
const copyObjectIsFunctions = /* @__PURE__ */ __name((object, clone) => {
|
|
11
|
+
if (!Object.isExtensible(object)) {
|
|
12
|
+
Object.preventExtensions(clone);
|
|
13
|
+
}
|
|
14
|
+
if (Object.isSealed(object)) {
|
|
15
|
+
Object.seal(clone);
|
|
16
|
+
}
|
|
17
|
+
if (Object.isFrozen(object)) {
|
|
18
|
+
Object.freeze(clone);
|
|
19
|
+
}
|
|
20
|
+
}, "copyObjectIsFunctions");
|
|
21
|
+
const copyObjectLoose = /* @__PURE__ */ __name((object, state) => {
|
|
22
|
+
const clone = getCleanClone(object);
|
|
23
|
+
state.cache.set(object, clone);
|
|
24
|
+
for (const key in object) {
|
|
25
|
+
if (Object.hasOwnProperty.call(object, key)) {
|
|
26
|
+
clone[key] = state.clone(object[key], state);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const symbols = Object.getOwnPropertySymbols(object);
|
|
30
|
+
for (let index = 0, { length } = symbols, symbol; index < length; ++index) {
|
|
31
|
+
symbol = symbols[index];
|
|
32
|
+
if (Object.prototype.propertyIsEnumerable.call(object, symbol)) {
|
|
33
|
+
clone[symbol] = state.clone(object[symbol], state);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
copyObjectIsFunctions(object, clone);
|
|
37
|
+
return clone;
|
|
38
|
+
}, "copyObjectLoose");
|
|
39
|
+
const copyObjectStrict = /* @__PURE__ */ __name((object, state) => {
|
|
40
|
+
const clone = getCleanClone(object);
|
|
41
|
+
state.cache.set(object, clone);
|
|
42
|
+
const clonedObject = copyOwnProperties(object, clone, state);
|
|
43
|
+
const objectPrototype = Object.getPrototypeOf(object);
|
|
44
|
+
if (Object.getPrototypeOf(clonedObject) !== objectPrototype) {
|
|
45
|
+
Object.setPrototypeOf(clonedObject, objectPrototype);
|
|
46
|
+
}
|
|
47
|
+
copyObjectIsFunctions(object, clone);
|
|
48
|
+
return clonedObject;
|
|
49
|
+
}, "copyObjectStrict");
|
|
50
|
+
|
|
51
|
+
exports.copyObjectLoose = copyObjectLoose;
|
|
52
|
+
exports.copyObjectStrict = copyObjectStrict;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
const getStrictProperties = /* @__PURE__ */ __name((object) => [
|
|
4
|
+
...Object.getOwnPropertyNames(object),
|
|
5
|
+
...Object.getOwnPropertySymbols(object)
|
|
6
|
+
], "getStrictProperties");
|
|
7
|
+
const copyOwnProperties = /* @__PURE__ */ __name((value, clone, state) => {
|
|
8
|
+
const properties = getStrictProperties(value);
|
|
9
|
+
for (const property of properties) {
|
|
10
|
+
if (property === "callee" || property === "caller") {
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, property);
|
|
14
|
+
if (!descriptor) {
|
|
15
|
+
clone[property] = state.clone(value[property], state);
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
if (!descriptor.get && !descriptor.set) {
|
|
19
|
+
descriptor.value = state.clone(descriptor.value, state);
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
Object.defineProperty(clone, property, descriptor);
|
|
23
|
+
} catch {
|
|
24
|
+
clone[property] = descriptor.value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return clone;
|
|
28
|
+
}, "copyOwnProperties");
|
|
29
|
+
|
|
30
|
+
export { copyOwnProperties as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
const getStrictProperties = /* @__PURE__ */ __name((object) => [
|
|
6
|
+
...Object.getOwnPropertyNames(object),
|
|
7
|
+
...Object.getOwnPropertySymbols(object)
|
|
8
|
+
], "getStrictProperties");
|
|
9
|
+
const copyOwnProperties = /* @__PURE__ */ __name((value, clone, state) => {
|
|
10
|
+
const properties = getStrictProperties(value);
|
|
11
|
+
for (const property of properties) {
|
|
12
|
+
if (property === "callee" || property === "caller") {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, property);
|
|
16
|
+
if (!descriptor) {
|
|
17
|
+
clone[property] = state.clone(value[property], state);
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
if (!descriptor.get && !descriptor.set) {
|
|
21
|
+
descriptor.value = state.clone(descriptor.value, state);
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
Object.defineProperty(clone, property, descriptor);
|
|
25
|
+
} catch {
|
|
26
|
+
clone[property] = descriptor.value;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return clone;
|
|
30
|
+
}, "copyOwnProperties");
|
|
31
|
+
|
|
32
|
+
module.exports = copyOwnProperties;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const copyOwnProperties = require('./copyOwnProperties-NdANNH2P.cjs');
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
+
const copyRegExpLoose = /* @__PURE__ */ __name((regExp) => {
|
|
10
|
+
const clone = new RegExp(regExp.source, regExp.flags);
|
|
11
|
+
clone.lastIndex = regExp.lastIndex;
|
|
12
|
+
return clone;
|
|
13
|
+
}, "copyRegExpLoose");
|
|
14
|
+
const copyRegExpStrict = /* @__PURE__ */ __name((regExp, state) => {
|
|
15
|
+
const clone = new RegExp(regExp.source, regExp.flags);
|
|
16
|
+
return copyOwnProperties(regExp, clone, state);
|
|
17
|
+
}, "copyRegExpStrict");
|
|
18
|
+
|
|
19
|
+
exports.copyRegExpLoose = copyRegExpLoose;
|
|
20
|
+
exports.copyRegExpStrict = copyRegExpStrict;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import copyOwnProperties from './copyOwnProperties-FDDRgAnK.mjs';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
const copyRegExpLoose = /* @__PURE__ */ __name((regExp) => {
|
|
6
|
+
const clone = new RegExp(regExp.source, regExp.flags);
|
|
7
|
+
clone.lastIndex = regExp.lastIndex;
|
|
8
|
+
return clone;
|
|
9
|
+
}, "copyRegExpLoose");
|
|
10
|
+
const copyRegExpStrict = /* @__PURE__ */ __name((regExp, state) => {
|
|
11
|
+
const clone = new RegExp(regExp.source, regExp.flags);
|
|
12
|
+
return copyOwnProperties(regExp, clone, state);
|
|
13
|
+
}, "copyRegExpStrict");
|
|
14
|
+
|
|
15
|
+
export { copyRegExpLoose, copyRegExpStrict };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const copyOwnProperties = require('./copyOwnProperties-NdANNH2P.cjs');
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
+
const copySetLoose = /* @__PURE__ */ __name((set, state) => {
|
|
10
|
+
const clone = /* @__PURE__ */ new Set();
|
|
11
|
+
state.cache.set(set, clone);
|
|
12
|
+
set.forEach((value) => {
|
|
13
|
+
clone.add(state.clone(value, state));
|
|
14
|
+
});
|
|
15
|
+
return clone;
|
|
16
|
+
}, "copySetLoose");
|
|
17
|
+
const copySetStrict = /* @__PURE__ */ __name((set, state) => copyOwnProperties(set, copySetLoose(set, state), state), "copySetStrict");
|
|
18
|
+
|
|
19
|
+
exports.copySetLoose = copySetLoose;
|
|
20
|
+
exports.copySetStrict = copySetStrict;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import copyOwnProperties from './copyOwnProperties-FDDRgAnK.mjs';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
const copySetLoose = /* @__PURE__ */ __name((set, state) => {
|
|
6
|
+
const clone = /* @__PURE__ */ new Set();
|
|
7
|
+
state.cache.set(set, clone);
|
|
8
|
+
set.forEach((value) => {
|
|
9
|
+
clone.add(state.clone(value, state));
|
|
10
|
+
});
|
|
11
|
+
return clone;
|
|
12
|
+
}, "copySetLoose");
|
|
13
|
+
const copySetStrict = /* @__PURE__ */ __name((set, state) => copyOwnProperties(set, copySetLoose(set, state), state), "copySetStrict");
|
|
14
|
+
|
|
15
|
+
export { copySetLoose, copySetStrict };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
const getCleanClone = /* @__PURE__ */ __name((input) => {
|
|
6
|
+
if (!input) {
|
|
7
|
+
return /* @__PURE__ */ Object.create(null);
|
|
8
|
+
}
|
|
9
|
+
const Constructor = input.constructor;
|
|
10
|
+
if (Constructor === Object) {
|
|
11
|
+
return input === Object.prototype ? {} : Object.create(input);
|
|
12
|
+
}
|
|
13
|
+
if (~Function.prototype.toString.call(Constructor).indexOf("[native code]")) {
|
|
14
|
+
try {
|
|
15
|
+
return new Constructor();
|
|
16
|
+
} catch {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return Object.create(input);
|
|
20
|
+
}, "getCleanClone");
|
|
21
|
+
|
|
22
|
+
module.exports = getCleanClone;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
const getCleanClone = /* @__PURE__ */ __name((input) => {
|
|
4
|
+
if (!input) {
|
|
5
|
+
return /* @__PURE__ */ Object.create(null);
|
|
6
|
+
}
|
|
7
|
+
const Constructor = input.constructor;
|
|
8
|
+
if (Constructor === Object) {
|
|
9
|
+
return input === Object.prototype ? {} : Object.create(input);
|
|
10
|
+
}
|
|
11
|
+
if (~Function.prototype.toString.call(Constructor).indexOf("[native code]")) {
|
|
12
|
+
try {
|
|
13
|
+
return new Constructor();
|
|
14
|
+
} catch {
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return Object.create(input);
|
|
18
|
+
}, "getCleanClone");
|
|
19
|
+
|
|
20
|
+
export { getCleanClone as default };
|
package/dist/utils.cjs
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const copyOwnProperties = require('./packem_shared/copyOwnProperties-NdANNH2P.cjs');
|
|
6
|
+
const getCleanClone = require('./packem_shared/getCleanClone-BhfRMqgx.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.copyOwnProperties = copyOwnProperties;
|
|
11
|
+
exports.getCleanClone = getCleanClone;
|
package/dist/utils.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export { default as copyOwnProperties } from './packem_shared/copyOwnProperties-FDDRgAnK.mjs';
|
|
2
|
+
export { default as getCleanClone } from './packem_shared/getCleanClone-Ch3gqIzM.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/deep-clone",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.8",
|
|
4
4
|
"description": "Fastest deep clone implementation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -118,23 +118,23 @@
|
|
|
118
118
|
"devDependencies": {
|
|
119
119
|
"@anolilab/eslint-config": "^15.0.3",
|
|
120
120
|
"@anolilab/prettier-config": "^5.0.14",
|
|
121
|
-
"@anolilab/semantic-release-pnpm": "^1.1.
|
|
122
|
-
"@anolilab/semantic-release-preset": "^9.0.
|
|
123
|
-
"@arethetypeswrong/cli": "^0.17.
|
|
121
|
+
"@anolilab/semantic-release-pnpm": "^1.1.6",
|
|
122
|
+
"@anolilab/semantic-release-preset": "^9.0.3",
|
|
123
|
+
"@arethetypeswrong/cli": "^0.17.2",
|
|
124
124
|
"@mfederczuk/deeptools": "2.1.0-indev01",
|
|
125
125
|
"@rushstack/eslint-plugin-security": "^0.8.3",
|
|
126
126
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
127
127
|
"@types/lodash.clonedeep": "^4.5.9",
|
|
128
128
|
"@types/node": "18.19.15",
|
|
129
129
|
"@ungap/structured-clone": "^1.2.1",
|
|
130
|
-
"@visulima/packem": "1.
|
|
130
|
+
"@visulima/packem": "1.10.7",
|
|
131
131
|
"@vitest/coverage-v8": "^2.1.8",
|
|
132
132
|
"@vitest/ui": "^2.1.8",
|
|
133
133
|
"clone-deep": "^4.0.1",
|
|
134
134
|
"conventional-changelog-conventionalcommits": "8.0.0",
|
|
135
135
|
"cross-env": "^7.0.3",
|
|
136
136
|
"deep-copy": "^1.4.2",
|
|
137
|
-
"esbuild": "0.24.
|
|
137
|
+
"esbuild": "0.24.2",
|
|
138
138
|
"eslint": "8.57.0",
|
|
139
139
|
"eslint-plugin-deprecation": "^3.0.0",
|
|
140
140
|
"eslint-plugin-etc": "^2.0.3",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"eslint-plugin-vitest": "^0.4.1",
|
|
145
145
|
"eslint-plugin-vitest-globals": "^1.5.0",
|
|
146
146
|
"fast-copy": "^3.0.2",
|
|
147
|
-
"jsdom": "^
|
|
147
|
+
"jsdom": "^26.0.0",
|
|
148
148
|
"lodash.clonedeep": "^4.5.0",
|
|
149
149
|
"nano-copy": "^0.1.1",
|
|
150
150
|
"nanoclone": "^1.0.2",
|
|
@@ -152,10 +152,10 @@
|
|
|
152
152
|
"prettier": "^3.4.2",
|
|
153
153
|
"ramda": "^0.30.1",
|
|
154
154
|
"rfdc": "^1.4.1",
|
|
155
|
-
"rimraf": "
|
|
156
|
-
"semantic-release": "24.
|
|
155
|
+
"rimraf": "6.0.1",
|
|
156
|
+
"semantic-release": "24.2.1",
|
|
157
157
|
"standard": "^17.1.2",
|
|
158
|
-
"typescript": "5.
|
|
158
|
+
"typescript": "5.7.3",
|
|
159
159
|
"vitest": "^2.1.8"
|
|
160
160
|
},
|
|
161
161
|
"engines": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var f=Object.defineProperty;var a=(r,t)=>f(r,"name",{value:t,configurable:!0});var o=Object.defineProperty,A=a((r,t)=>o(r,"name",{value:t,configurable:!0}),"y");const i=A(r=>{const t={BigInt64Array,BigUint64Array,Buffer:Buffer.from,Float32Array,Float64Array,Int8Array,Int16Array,Int32Array,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array};if(r instanceof ArrayBuffer){const e=new ArrayBuffer(r.byteLength),y=new Uint8Array(r);return new Uint8Array(e).set(y),e}const n=t[r.constructor.name]??void 0;return n?new n(r):new r.constructor([...r.buffer],r.byteOffset,r.length)},"copyArrayBuffer");module.exports=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var f=Object.defineProperty;var a=(r,t)=>f(r,"name",{value:t,configurable:!0});var o=Object.defineProperty,A=a((r,t)=>o(r,"name",{value:t,configurable:!0}),"y");const u=A(r=>{const t={BigInt64Array,BigUint64Array,Buffer:Buffer.from,Float32Array,Float64Array,Int8Array,Int16Array,Int32Array,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array};if(r instanceof ArrayBuffer){const e=new ArrayBuffer(r.byteLength),y=new Uint8Array(r);return new Uint8Array(e).set(y),e}const n=t[r.constructor.name]??void 0;return n?new n(r):new r.constructor([...r.buffer],r.byteOffset,r.length)},"copyArrayBuffer");export{u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=Object.defineProperty;var e=(r,o)=>n(r,"name",{value:o,configurable:!0});import p from"./copyOwnProperties-QEhjt2x8.mjs";var s=Object.defineProperty,a=e((r,o)=>s(r,"name",{value:o,configurable:!0}),"u");const u=a((r,o)=>{const t=[];o.cache.set(r,t);for(let c=0,{length:y}=r;c<y;++c)t[c]=o.clone(r[c],o);return t},"copyArrayLoose"),f=a((r,o)=>{const t=[];return o.cache.set(r,t),p(r,t,o)},"copyArrayStrict");export{u as copyArrayLoose,f as copyArrayStrict};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var c=(r,o)=>s(r,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./copyOwnProperties-Zk6Vg6Oe.cjs");var i=Object.defineProperty,y=c((r,o)=>i(r,"name",{value:o,configurable:!0}),"u");const p=y((r,o)=>{const e=[];o.cache.set(r,e);for(let t=0,{length:a}=r;t<a;++t)e[t]=o.clone(r[t],o);return e},"copyArrayLoose"),l=y((r,o)=>{const e=[];return o.cache.set(r,e),n(r,e,o)},"copyArrayStrict");exports.copyArrayLoose=p;exports.copyArrayStrict=l;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var r=(e,t)=>s(e,"name",{value:t,configurable:!0});var a=Object.defineProperty,c=r((e,t)=>a(e,"name",{value:t,configurable:!0}),"a");const o=c(e=>e.slice(0,e.size,e.type),"copyBlob");module.exports=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var t=(e,a)=>o(e,"name",{value:a,configurable:!0});var r=Object.defineProperty,c=t((e,a)=>r(e,"name",{value:a,configurable:!0}),"a");const s=c(e=>e.slice(0,e.size,e.type),"copyBlob");export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var a=(e,r)=>t(e,"name",{value:r,configurable:!0});const c=require("./copyArrayBuffer-CErFt6r1.cjs");var o=Object.defineProperty,f=a((e,r)=>o(e,"name",{value:r,configurable:!0}),"a");const i=f(e=>new DataView(c(e.buffer)),"copyDataView");module.exports=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty;var r=(e,a)=>t(e,"name",{value:a,configurable:!0});import o from"./copyArrayBuffer-hX6Bv2Yc.mjs";var f=Object.defineProperty,i=r((e,a)=>f(e,"name",{value:a,configurable:!0}),"a");const p=i(e=>new DataView(o(e.buffer)),"copyDataView");export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r=Object.defineProperty;var t=(e,a)=>r(e,"name",{value:a,configurable:!0});var n=Object.defineProperty,o=t((e,a)=>n(e,"name",{value:a,configurable:!0}),"a");const l=o(e=>new Date(e.getTime()),"copyDate");export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var a=(e,t)=>r(e,"name",{value:t,configurable:!0});var c=Object.defineProperty,n=a((e,t)=>c(e,"name",{value:t,configurable:!0}),"a");const o=n(e=>new Date(e.getTime()),"copyDate");module.exports=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var a=(e,o)=>s(e,"name",{value:o,configurable:!0});import t from"./copyOwnProperties-QEhjt2x8.mjs";var n=Object.defineProperty,r=a((e,o)=>n(e,"name",{value:o,configurable:!0}),"o");const u=r((e,o)=>{const c=new e.constructor(e.message);return e.stack&&(c.stack=e.stack),e.code&&(c.code=e.code),e.errno&&(c.errno=e.errno),e.syscall&&(c.syscall=e.syscall),t(e,c,o)},"copyError");export{u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var s=(e,c)=>t(e,"name",{value:c,configurable:!0});const r=require("./copyOwnProperties-Zk6Vg6Oe.cjs");var a=Object.defineProperty,n=s((e,c)=>a(e,"name",{value:c,configurable:!0}),"o");const l=n((e,c)=>{const o=new e.constructor(e.message);return e.stack&&(o.stack=e.stack),e.code&&(o.code=e.code),e.errno&&(o.errno=e.errno),e.syscall&&(o.syscall=e.syscall),r(e,o,c)},"copyError");module.exports=l;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var e=(c,o)=>i(c,"name",{value:o,configurable:!0});import n from"./copyOwnProperties-QEhjt2x8.mjs";var s=Object.defineProperty,r=e((c,o)=>s(c,"name",{value:o,configurable:!0}),"t");const y=r((c,o)=>{const t=new Map;return o.cache.set(c,t),c.forEach((a,p)=>{t.set(p,o.clone(a,o))}),t},"copyMapLoose"),u=r((c,o)=>n(c,y(c,o),o),"copyMapStrict");export{y as copyMapLoose,u as copyMapStrict};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var c=(e,o)=>i(e,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./copyOwnProperties-Zk6Vg6Oe.cjs");var y=Object.defineProperty,r=c((e,o)=>y(e,"name",{value:o,configurable:!0}),"t");const p=r((e,o)=>{const t=new Map;return o.cache.set(e,t),e.forEach((a,s)=>{t.set(s,o.clone(a,o))}),t},"copyMapLoose"),u=r((e,o)=>n(e,p(e,o),o),"copyMapStrict");exports.copyMapLoose=p;exports.copyMapStrict=u;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var O=(e,t)=>l(e,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./copyOwnProperties-Zk6Vg6Oe.cjs"),b=require("./getCleanClone-DLZ_E9xd.cjs");var i=Object.defineProperty,s=O((e,t)=>i(e,"name",{value:t,configurable:!0}),"l");const p=s((e,t)=>{Object.isExtensible(e)||Object.preventExtensions(t),Object.isSealed(e)&&Object.seal(t),Object.isFrozen(e)&&Object.freeze(t)},"copyObjectIsFunctions"),a=s((e,t)=>{const o=b(e);t.cache.set(e,o);for(const c in e)Object.hasOwnProperty.call(e,c)&&(o[c]=t.clone(e[c],t));const r=Object.getOwnPropertySymbols(e);for(let c=0,{length:j}=r,n;c<j;++c)n=r[c],Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=t.clone(e[n],t));return p(e,o),o},"copyObjectLoose"),u=s((e,t)=>{const o=b(e);t.cache.set(e,o);const r=y(e,o,t),c=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)!==c&&Object.setPrototypeOf(r,c),p(e,o),r},"copyObjectStrict");exports.copyObjectLoose=a;exports.copyObjectStrict=u;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var l=Object.defineProperty;var O=(t,e)=>l(t,"name",{value:e,configurable:!0});import y from"./copyOwnProperties-QEhjt2x8.mjs";import b from"./getCleanClone-D0FN9QGR.mjs";var i=Object.defineProperty,s=O((t,e)=>i(t,"name",{value:e,configurable:!0}),"l");const p=s((t,e)=>{Object.isExtensible(t)||Object.preventExtensions(e),Object.isSealed(t)&&Object.seal(e),Object.isFrozen(t)&&Object.freeze(e)},"copyObjectIsFunctions"),u=s((t,e)=>{const c=b(t);e.cache.set(t,c);for(const o in t)Object.hasOwnProperty.call(t,o)&&(c[o]=e.clone(t[o],e));const r=Object.getOwnPropertySymbols(t);for(let o=0,{length:j}=r,n;o<j;++o)n=r[o],Object.prototype.propertyIsEnumerable.call(t,n)&&(c[n]=e.clone(t[n],e));return p(t,c),c},"copyObjectLoose"),P=s((t,e)=>{const c=b(t);e.cache.set(t,c);const r=y(t,c,e),o=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)!==o&&Object.setPrototypeOf(r,o),p(t,c),r},"copyObjectStrict");export{u as copyObjectLoose,P as copyObjectStrict};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var n=(e,t)=>i(e,"name",{value:t,configurable:!0});var s=Object.defineProperty,a=n((e,t)=>s(e,"name",{value:t,configurable:!0}),"s");const p=a(e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)],"getStrictProperties"),O=a((e,t,o)=>{const l=p(e);for(const r of l){if(r==="callee"||r==="caller")continue;const c=Object.getOwnPropertyDescriptor(e,r);if(!c){t[r]=o.clone(e[r],o);continue}!c.get&&!c.set&&(c.value=o.clone(c.value,o));try{Object.defineProperty(t,r,c)}catch{t[r]=c.value}}return t},"copyOwnProperties");export{O as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var n=(e,t)=>i(e,"name",{value:t,configurable:!0});var l=Object.defineProperty,s=n((e,t)=>l(e,"name",{value:t,configurable:!0}),"s");const p=s(e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)],"getStrictProperties"),u=s((e,t,o)=>{const a=p(e);for(const r of a){if(r==="callee"||r==="caller")continue;const c=Object.getOwnPropertyDescriptor(e,r);if(!c){t[r]=o.clone(e[r],o);continue}!c.get&&!c.set&&(c.value=o.clone(c.value,o));try{Object.defineProperty(t,r,c)}catch{t[r]=c.value}}return t},"copyOwnProperties");module.exports=u;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var r=(e,o)=>p(e,"name",{value:o,configurable:!0});import n from"./copyOwnProperties-QEhjt2x8.mjs";var s=Object.defineProperty,t=r((e,o)=>s(e,"name",{value:o,configurable:!0}),"o");const x=t(e=>{const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o},"copyRegExpLoose"),i=t((e,o)=>{const c=new RegExp(e.source,e.flags);return n(e,c,o)},"copyRegExpStrict");export{x as copyRegExpLoose,i as copyRegExpStrict};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var t=(e,o)=>p(e,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./copyOwnProperties-Zk6Vg6Oe.cjs");var n=Object.defineProperty,r=t((e,o)=>n(e,"name",{value:o,configurable:!0}),"o");const g=r(e=>{const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o},"copyRegExpLoose"),a=r((e,o)=>{const c=new RegExp(e.source,e.flags);return s(e,c,o)},"copyRegExpStrict");exports.copyRegExpLoose=g;exports.copyRegExpStrict=a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=Object.defineProperty;var o=(e,t)=>a(e,"name",{value:t,configurable:!0});import p from"./copyOwnProperties-QEhjt2x8.mjs";var S=Object.defineProperty,r=o((e,t)=>S(e,"name",{value:t,configurable:!0}),"n");const i=r((e,t)=>{const c=new Set;return t.cache.set(e,c),e.forEach(n=>{c.add(t.clone(n,t))}),c},"copySetLoose"),f=r((e,t)=>p(e,i(e,t),t),"copySetStrict");export{i as copySetLoose,f as copySetStrict};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var c=(t,e)=>a(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./copyOwnProperties-Zk6Vg6Oe.cjs");var p=Object.defineProperty,r=c((t,e)=>p(t,"name",{value:e,configurable:!0}),"n");const n=r((t,e)=>{const o=new Set;return e.cache.set(t,o),t.forEach(S=>{o.add(e.clone(S,e))}),o},"copySetLoose"),s=r((t,e)=>i(t,n(t,e),e),"copySetStrict");exports.copySetLoose=n;exports.copySetStrict=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var c=Object.defineProperty;var r=(e,t)=>c(e,"name",{value:t,configurable:!0});var n=Object.defineProperty,o=r((e,t)=>n(e,"name",{value:t,configurable:!0}),"r");const u=o(e=>{if(!e)return Object.create(null);const t=e.constructor;if(t===Object)return e===Object.prototype?{}:Object.create(e);if(~Function.prototype.toString.call(t).indexOf("[native code]"))try{return new t}catch{}return Object.create(e)},"getCleanClone");export{u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var c=Object.defineProperty;var r=(e,t)=>c(e,"name",{value:t,configurable:!0});var n=Object.defineProperty,o=r((e,t)=>n(e,"name",{value:t,configurable:!0}),"r");const a=o(e=>{if(!e)return Object.create(null);const t=e.constructor;if(t===Object)return e===Object.prototype?{}:Object.create(e);if(~Function.prototype.toString.call(t).indexOf("[native code]"))try{return new t}catch{}return Object.create(e)},"getCleanClone");module.exports=a;
|