MCPcopy Create free account
hub / github.com/LevelUpWeb3/app / shallowEquals

Function shallowEquals

src/utils/common.ts:7–17  ·  view source on GitHub ↗
(a?: DependencyList, b?: DependencyList)

Source from the content-addressed store, hash-verified

5// import { STORAGE_AVAILABLE } from "../constants/storageKey"
6
7export const shallowEquals = (a?: DependencyList, b?: DependencyList) => {
8 if (a?.length !== b?.length) return false;
9 if (a === undefined && b === undefined) return true;
10 if (a === undefined || b === undefined) return false;
11
12 for (let i = 0; i < a.length; i++) {
13 if (a[i] !== b[i]) return false;
14 }
15
16 return true;
17};
18
19export function findNetworkBySlug(slug: string, networks: any[]) {
20 return find(networks, ["slug", slug]);

Callers 1

useAsyncMemoFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected