MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / updateArrayInPlace

Function updateArrayInPlace

frontend/src/components/fu/shared.ts:66–71  ·  view source on GitHub ↗
(target: T[], next: T[])

Source from the content-addressed store, hash-verified

64};
65
66export const updateArrayInPlace = <T>(target: T[], next: T[]) => {
67 if (target.length === next.length && target.every((item, index) => item === next[index])) {
68 return;
69 }
70 target.splice(0, target.length, ...next);
71};

Callers 1

syncColumnsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected