bunshin-clone 1.8.12 → 1.8.13

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 CHANGED
@@ -131,10 +131,9 @@ function clonePlainObject(object, settings, refs) {
131
131
  const result = Object.create(Object.getPrototypeOf(object));
132
132
  refs.set(object, result);
133
133
  for (const key of Object.keys(object)) {
134
- if (isUnsafeKey(key)) {
135
- continue;
134
+ if (!isUnsafeKey(key)) {
135
+ result[key] = clone(object[key], settings, refs);
136
136
  }
137
- result[key] = clone(object[key], settings, refs);
138
137
  }
139
138
  if (settings.preserveSymbolKeys) {
140
139
  for (const symbol of OWN_SYMBOLS(object)) {
package/dist/index.js CHANGED
@@ -129,10 +129,9 @@ function clonePlainObject(object, settings, refs) {
129
129
  const result = Object.create(Object.getPrototypeOf(object));
130
130
  refs.set(object, result);
131
131
  for (const key of Object.keys(object)) {
132
- if (isUnsafeKey(key)) {
133
- continue;
132
+ if (!isUnsafeKey(key)) {
133
+ result[key] = clone(object[key], settings, refs);
134
134
  }
135
- result[key] = clone(object[key], settings, refs);
136
135
  }
137
136
  if (settings.preserveSymbolKeys) {
138
137
  for (const symbol of OWN_SYMBOLS(object)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunshin-clone",
3
- "version": "1.8.12",
3
+ "version": "1.8.13",
4
4
  "description": "High-performance deep clone utility with descriptor support",
5
5
  "keywords": [
6
6
  "array",