| 5 | // import { STORAGE_AVAILABLE } from "../constants/storageKey" |
| 6 | |
| 7 | export 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 | |
| 19 | export function findNetworkBySlug(slug: string, networks: any[]) { |
| 20 | return find(networks, ["slug", slug]); |