Files
common/packages/util/src/is/testChain.ts
T
2022-01-01 09:26:11 +02:00

13 lines
301 B
TypeScript

// Copyright 2017-2022 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
const REGEX_DEV = /(Development|Local Testnet)$/;
export function isTestChain (chain?: string | null): boolean {
if (!chain) {
return false;
}
return !!REGEX_DEV.test(chain.toString());
}