checkNetworkPrefix
function checkNetworkPrefix(prefix: string): prefix is NetworkPrefix;
Defined in: packages/iso-filecoin/src/utils.js:141
Checks if the prefix is a valid network prefix
Parameters
Parameter | Type |
---|---|
prefix | string |
Returns
prefix is NetworkPrefix
Example
import { function checkNetworkPrefix(prefix: string): prefix is NetworkPrefix
Checks if the prefix is a valid network prefix
checkNetworkPrefix } from 'iso-filecoin/utils'
function checkNetworkPrefix(prefix: string): prefix is NetworkPrefix
Checks if the prefix is a valid network prefix
checkNetworkPrefix('f') // truefunction checkNetworkPrefix(prefix: string): prefix is NetworkPrefix
Checks if the prefix is a valid network prefix
checkNetworkPrefix('t') // truefunction checkNetworkPrefix(prefix: string): prefix is NetworkPrefix
Checks if the prefix is a valid network prefix
checkNetworkPrefix('x') // false