MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / copy

Method copy

packages/core/src/utils/Utils.ts:335–337  ·  view source on GitHub ↗

* Creates deep copy of given object.

(entity: T, respectCustomCloneMethod = true)

Source from the content-addressed store, hash-verified

333 * Creates deep copy of given object.
334 */
335 static copy<T>(entity: T, respectCustomCloneMethod = true): T {
336 return clone(entity, respectCustomCloneMethod);
337 }
338
339 /**
340 * Normalize the argument to always be an array.

Callers 15

buildPopulateWhereFunction · 0.80
cloneMethod · 0.80
logMethod · 0.80
saveToCacheMethod · 0.80
upsertMethod · 0.80
upsertManyMethod · 0.80
forkMethod · 0.80
_cloneFunction · 0.80
_mergeMethod · 0.80
constructorFunction · 0.80
createReplicasFunction · 0.80

Calls 1

cloneFunction · 0.70

Tested by 1

saveToCacheMethod · 0.64