MCPcopy Create free account
hub / github.com/devspace-sh/devspace / deepCopy

Function deepCopy

ui/src/lib/utils.tsx:101–107  ·  view source on GitHub ↗
(obj: any)

Source from the content-addressed store, hash-verified

99}
100
101export const deepCopy: <T>(obj: T) => T = (obj: any) => {
102 if (!obj) {
103 return obj;
104 }
105
106 return JSON.parse(JSON.stringify(obj));
107};
108
109export const AddExtraProps = (Component: JSX.Element, extraProps: any) => {
110 return <Component.type key={Component.key} {...Component.props} {...extraProps} />;

Callers

nothing calls this directly

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected