MCPcopy Create free account
hub / github.com/subquery/subql / isNetwork

Function isNetwork

packages/cli/src/utils/networkFamily.ts:8–10  ·  view source on GitHub ↗
(network: string)

Source from the content-addressed store, hash-verified

6const lowerCaseFirst = (str: string) => str.charAt(0).toLowerCase() + str.slice(1);
7
8function isNetwork(network: string): network is NETWORK_FAMILY {
9 return !!network && lowerCaseFirst(network) in NETWORK_FAMILY;
10}
11
12// can be either lowerCased or UpperCased
13export function getNetworkFamily(network: string): NETWORK_FAMILY {

Callers 1

getNetworkFamilyFunction · 0.85

Calls 1

lowerCaseFirstFunction · 0.85

Tested by

no test coverage detected