MCPcopy
hub / github.com/apollographql/apollo-client / cloneDeep

Function cloneDeep

packages/apollo-utilities/src/util/cloneDeep.ts:6–8  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

4 * Deeply clones a value to create a new instance.
5 */
6export function cloneDeep<T>(value: T): T {
7 return cloneDeepHelper(value, new Map());
8}
9
10function cloneDeepHelper<T>(val: T, seen: Map<any, any>): T {
11 switch (toString.call(val)) {

Callers 12

cloneDeep.tsFile · 0.90
updateLastResultMethod · 0.90
directives.tsFile · 0.85
itWithInitialDataFunction · 0.85
cache.tsFile · 0.85
writeToStore.tsFile · 0.85
index.tsFile · 0.85
fetchMore.tsFile · 0.85
clientRoundtripFunction · 0.85
optimistic.tsFile · 0.85
mutationResults.tsFile · 0.85
nextFunction · 0.85

Calls 1

cloneDeepHelperFunction · 0.85

Tested by 3

itWithInitialDataFunction · 0.68
clientRoundtripFunction · 0.68
nextFunction · 0.68