MCPcopy
hub / github.com/nhn/tui.chart / deepCopyArray

Function deepCopyArray

apps/chart/src/helpers/utils.ts:269–277  ·  view source on GitHub ↗
(items: T)

Source from the content-addressed store, hash-verified

267}
268
269export function deepCopyArray<T extends Array<any>>(items: T): T {
270 return items.map((item: T[number]) => {
271 if (isObject(item)) {
272 return Array.isArray(item) ? deepCopyArray(item) : deepCopy(item);
273 }
274
275 return item;
276 }) as T;
277}
278
279export function deepCopy<T extends Record<string, any>>(obj: T) {
280 const resultObj = {} as T;

Callers 6

renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
utils.spec.tsFile · 0.90
deepMergedCopyFunction · 0.70
deepCopyFunction · 0.70

Calls 2

isObjectFunction · 0.70
deepCopyFunction · 0.70

Tested by

no test coverage detected