@dynamic-labs/utils
Advanced tools
Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "@dynamic-labs/utils", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"repository": { | ||
@@ -31,4 +31,4 @@ "type": "git", | ||
"tldts": "6.0.16", | ||
"@dynamic-labs/logger": "3.0.1", | ||
"@dynamic-labs/types": "3.0.1", | ||
"@dynamic-labs/logger": "3.0.2", | ||
"@dynamic-labs/types": "3.0.2", | ||
"buffer": "6.0.3", | ||
@@ -35,0 +35,0 @@ "eventemitter3": "5.0.1", |
@@ -17,3 +17,3 @@ 'use client' | ||
// Create a new object using the same prototype as the original | ||
const clone = Object.create(Object.getPrototypeOf(original), descriptors); | ||
const clone = Object.create(Object.getPrototypeOf(original)); | ||
// // Loop through the overrides to redefine any read-only methods | ||
@@ -31,2 +31,11 @@ for (const [key, value] of Object.entries(overrides)) { | ||
} | ||
const overridesKeys = Object.keys(overrides); | ||
// add properties from original object if they're not in overrides | ||
// if we add all of them, read-only props/methods might not get properly overwritten | ||
for (const [key, descriptor] of Object.entries(descriptors)) { | ||
// if has not been overwritten, add original | ||
if (!overridesKeys.includes(key)) { | ||
Object.defineProperty(clone, key, descriptor); | ||
} | ||
} | ||
return clone; | ||
@@ -33,0 +42,0 @@ }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
539350
4546
+ Added@dynamic-labs/logger@3.0.2(transitive)
+ Added@dynamic-labs/types@3.0.2(transitive)
- Removed@dynamic-labs/logger@3.0.1(transitive)
- Removed@dynamic-labs/types@3.0.1(transitive)
Updated@dynamic-labs/logger@3.0.2
Updated@dynamic-labs/types@3.0.2