コンテンツにスキップ

NetworkLocator⚓︎

NetworkLocator
Provides utility functions for finding a network.

Constructors⚓︎

new NetworkLocator()⚓︎

new NetworkLocator(): NetworkLocator

Returns⚓︎

NetworkLocator

Methods⚓︎

findByIdentifier()⚓︎

static findByIdentifier<TNetwork>(networks, singleOrMultipleIdentifiers): TNetwork

NetworkLocator.findByIdentifier
Finds a network with a specified identifier within a list of networks.

Type Parameters⚓︎

Type Parameter Description
TNetwork extends Network<any, any>

Parameters⚓︎

Parameter Type Description
networks TNetwork[] List of networks to search.
singleOrMultipleIdentifiers number | number[] Identifiers for which to search.

Returns⚓︎

TNetwork

First network with an identifier in the supplied list.


findByName()⚓︎

static findByName<TNetwork>(networks, singleOrMultipleNames): TNetwork

NetworkLocator.findByName
Finds a network with a specified name within a list of networks.

Type Parameters⚓︎

Type Parameter Description
TNetwork extends Network<any, any>

Parameters⚓︎

Parameter Type Description
networks TNetwork[] List of networks to search.
singleOrMultipleNames string | string[] Names for which to search.

Returns⚓︎

TNetwork

First network with a name in the supplied list.