Skip to content
0

katanakit-js / replaceEqualDeep

Function: replaceEqualDeep() ​

ts
function replaceEqualDeep<T>(
   a, 
   b, 
   depth?
): T;

Defined in: node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:999

This function returns a if b is deeply equal. If not, it will replace any deeply equal children of b with those of a. This can be used for structural sharing between JSON values for example.

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
aunknown
bT
depth?number

Returns ​

T

Released under the MIT License.