MCPcopy Index your code
hub / github.com/CSFrequency/react-firebase-hooks / isEqual

Function isEqual

util/refHooks.ts:28–35  ·  view source on GitHub ↗
(
  v1: T | null | undefined,
  v2: T | null | undefined
)

Source from the content-addressed store, hash-verified

26}
27
28const isEqual = <T extends HasIsEqual<T>>(
29 v1: T | null | undefined,
30 v2: T | null | undefined
31): boolean => {
32 const bothNull: boolean = !v1 && !v2;
33 const equal: boolean = !!v1 && !!v2 && v1.isEqual(v2);
34 return bothNull || equal;
35};
36
37export const useIsEqualRef = <T extends HasIsEqual<T>>(
38 value: T | null | undefined,

Callers 1

useComparatorRefFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected