Skip to content

Commit 8c2d55b

Browse files
committed
refactor: replace lodash with native structuredClone for deep cloning
1 parent 4a27159 commit 8c2d55b

File tree

3 files changed

+34
-635
lines changed

3 files changed

+34
-635
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"font-awesome": "^4.7.0",
5050
"highlight.js": "^11.11.1",
5151
"jquery": "^3.7.1",
52-
"lodash": "^4.17.21",
5352
"material-design-icons": "^3.0.1",
5453
"minimist": "^1.2.8",
5554
"ngx-highlightjs": "^12.0.0",

projects/ngx-json-table/src/lib/lib/helpers.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { cloneDeep } from 'lodash';
2-
31
/**
42
* Extending object that entered in first argument.
53
*
@@ -50,7 +48,7 @@ export const deepExtend = function <T extends object>(...objects: T[]): T | fals
5048

5149
// just clone arrays (and recursive clone objects inside)
5250
} else if (Array.isArray(val)) {
53-
target[key] = cloneDeep(val);
51+
target[key] = structuredClone(val);
5452
return;
5553

5654
// overwrite by new value if source isn't object or array

0 commit comments

Comments
 (0)