bunshin-clone 2.0.7 → 2.0.9

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.
@@ -153,18 +153,14 @@ function OWN_ENUM_KEYS(object) {
153
153
  function OWN_ENUM_STRING_KEYS(object) {
154
154
  const keys = Object.keys(object);
155
155
  for (const key of keys) {
156
- if (isUnsafeKey(key)) {
157
- keys.splice(keys.indexOf(key), 1);
158
- }
156
+ isUnsafeKey(key) && keys.splice(keys.indexOf(key), 1);
159
157
  }
160
158
  return keys;
161
159
  }
162
160
  function OWN_ENUM_SYMBOL_KEYS(object) {
163
161
  const keys = OWN_SYMBOL_KEYS(object);
164
162
  for (const key of keys) {
165
- if (!Object.prototype.propertyIsEnumerable.call(object, key)) {
166
- keys.splice(keys.indexOf(key), 1);
167
- }
163
+ !Object.prototype.propertyIsEnumerable.call(object, key) && keys.splice(keys.indexOf(key), 1);
168
164
  }
169
165
  return keys;
170
166
  }
@@ -174,9 +170,7 @@ function OWN_KEYS(object) {
174
170
  function OWN_STRING_KEYS(object) {
175
171
  const keys = Object.getOwnPropertyNames(object);
176
172
  for (const key of keys) {
177
- if (isUnsafeKey(key)) {
178
- keys.splice(keys.indexOf(key), 1);
179
- }
173
+ isUnsafeKey(key) && keys.splice(keys.indexOf(key), 1);
180
174
  }
181
175
  return keys;
182
176
  }
@@ -151,18 +151,14 @@ function OWN_ENUM_KEYS(object) {
151
151
  function OWN_ENUM_STRING_KEYS(object) {
152
152
  const keys = Object.keys(object);
153
153
  for (const key of keys) {
154
- if (isUnsafeKey(key)) {
155
- keys.splice(keys.indexOf(key), 1);
156
- }
154
+ isUnsafeKey(key) && keys.splice(keys.indexOf(key), 1);
157
155
  }
158
156
  return keys;
159
157
  }
160
158
  function OWN_ENUM_SYMBOL_KEYS(object) {
161
159
  const keys = OWN_SYMBOL_KEYS(object);
162
160
  for (const key of keys) {
163
- if (!Object.prototype.propertyIsEnumerable.call(object, key)) {
164
- keys.splice(keys.indexOf(key), 1);
165
- }
161
+ !Object.prototype.propertyIsEnumerable.call(object, key) && keys.splice(keys.indexOf(key), 1);
166
162
  }
167
163
  return keys;
168
164
  }
@@ -172,9 +168,7 @@ function OWN_KEYS(object) {
172
168
  function OWN_STRING_KEYS(object) {
173
169
  const keys = Object.getOwnPropertyNames(object);
174
170
  for (const key of keys) {
175
- if (isUnsafeKey(key)) {
176
- keys.splice(keys.indexOf(key), 1);
177
- }
171
+ isUnsafeKey(key) && keys.splice(keys.indexOf(key), 1);
178
172
  }
179
173
  return keys;
180
174
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunshin-clone",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "High-performance deep clone utility with descriptor support",
5
5
  "keywords": [
6
6
  "array",
@@ -69,7 +69,7 @@
69
69
  "test": "bun test"
70
70
  },
71
71
  "dependencies": {
72
- "@y14e/own": "^1.0.3"
72
+ "@y14e/own": "^1.0.5"
73
73
  },
74
74
  "devDependencies": {
75
75
  "bun-types": "latest",