MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / deepCopy

Function deepCopy

src/shared/Util.ts:216–226  ·  view source on GitHub ↗
(source: T)

Source from the content-addressed store, hash-verified

214 * @returns New copy of source
215 */
216export function deepCopy<T>(source: T): T {
217 const copy: any = Array.isArray(source) ? [] : {};
218 for (const key in source) {
219 let val = source[key];
220 if (val !== null && typeof val === 'object') {
221 val = deepCopy(val);
222 }
223 copy[key] = val;
224 }
225 return copy;
226}
227
228/**
229 * Recursively go down a folder and call back for each file encountered

Callers 15

onEditAddAppMethod · 0.90
RightBrowseSidebarClass · 0.90
openEditorFunction · 0.90
GameConfigEditorDialogFunction · 0.90
RightTagsSidebarClass · 0.90
TagCategoriesPageClass · 0.90
TagsPageClass · 0.90
ConfigPageClass · 0.90
slice.tsFile · 0.90
selectPlaylistFunction · 0.90
selectGameFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected