bunshin-clone 1.8.2 → 1.8.4
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/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -59,7 +59,7 @@ function clone(value, settings, refs) {
|
|
|
59
59
|
refs
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
|
-
if (value instanceof
|
|
62
|
+
if (value instanceof Error) {
|
|
63
63
|
return cloneError(value, settings, refs);
|
|
64
64
|
}
|
|
65
65
|
if (value instanceof Blob) {
|
|
@@ -139,7 +139,7 @@ function clonePlainObject(object, settings, refs) {
|
|
|
139
139
|
}
|
|
140
140
|
} else {
|
|
141
141
|
for (const key of Reflect.ownKeys(object)) {
|
|
142
|
-
if (isUnsafeKey(key) || !Object.propertyIsEnumerable.call(object, key)) {
|
|
142
|
+
if (isUnsafeKey(key) || !Object.prototype.propertyIsEnumerable.call(object, key)) {
|
|
143
143
|
continue;
|
|
144
144
|
}
|
|
145
145
|
result[key] = clone(object[key], settings, refs);
|
package/dist/index.js
CHANGED
|
@@ -57,7 +57,7 @@ function clone(value, settings, refs) {
|
|
|
57
57
|
refs
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
|
-
if (value instanceof
|
|
60
|
+
if (value instanceof Error) {
|
|
61
61
|
return cloneError(value, settings, refs);
|
|
62
62
|
}
|
|
63
63
|
if (value instanceof Blob) {
|
|
@@ -137,7 +137,7 @@ function clonePlainObject(object, settings, refs) {
|
|
|
137
137
|
}
|
|
138
138
|
} else {
|
|
139
139
|
for (const key of Reflect.ownKeys(object)) {
|
|
140
|
-
if (isUnsafeKey(key) || !Object.propertyIsEnumerable.call(object, key)) {
|
|
140
|
+
if (isUnsafeKey(key) || !Object.prototype.propertyIsEnumerable.call(object, key)) {
|
|
141
141
|
continue;
|
|
142
142
|
}
|
|
143
143
|
result[key] = clone(object[key], settings, refs);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunshin-clone",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.4",
|
|
4
4
|
"description": "High-performance deep clone utility with descriptor support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"bun-types": "latest",
|
|
68
68
|
"tsup": "^8.0.0",
|
|
69
|
+
"type-fest": "^5.10.0",
|
|
69
70
|
"typescript": "^5.9.3"
|
|
70
71
|
},
|
|
71
72
|
"engines": {
|