Skip to content

Commit a71aa06

Browse files
committed
debt - remove unused deepClone
1 parent e59a441 commit a71aa06

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

src/vs/base/common/objects.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,6 @@ export function clone<T>(obj: T): T {
2626
return result;
2727
}
2828

29-
export function deepClone<T>(obj: T): T {
30-
if (!obj || typeof obj !== 'object') {
31-
return obj;
32-
}
33-
const result: any = Array.isArray(obj) ? [] : {};
34-
Object.getOwnPropertyNames(obj).forEach((key: keyof T) => {
35-
if (obj[key] && typeof obj[key] === 'object') {
36-
result[key] = deepClone(obj[key]);
37-
} else {
38-
result[key] = obj[key];
39-
}
40-
});
41-
return result;
42-
}
43-
4429
export function deepFreeze<T>(obj: T): T {
4530
if (!obj || typeof obj !== 'object') {
4631
return obj;

0 commit comments

Comments
 (0)