@oozcitak/dom
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -25,3 +25,3 @@ import { GlobalStore } from './GlobalStore'; | ||
*/ | ||
export declare function clone<T>(obj: T): T; | ||
export declare function clone<T extends Function | any[] | Object>(obj: T): T; | ||
/** | ||
@@ -28,0 +28,0 @@ * Type guard for boolean types |
@@ -61,4 +61,8 @@ "use strict"; | ||
const result = {}; | ||
for (const [key, val] of Object.entries(obj)) { | ||
result[key] = clone(val); | ||
for (const key in obj) { | ||
/* istanbul ignore next */ | ||
if (obj.hasOwnProperty(key)) { | ||
const val = obj[key]; | ||
result[key] = clone(val); | ||
} | ||
} | ||
@@ -65,0 +69,0 @@ return result; |
{ | ||
"name": "@oozcitak/dom", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "dom", |
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
1086525
21516