MCPcopy Create free account
hub / github.com/NomicFoundation/hardhat / parseMode

Function parseMode

scripts/profiler/helpers/args.ts:28–41  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

26}
27
28export function parseMode(value: string | undefined): Mode {
29 if (value === undefined) {
30 return Mode.Both;
31 }
32
33 if (value !== Mode.System && value !== Mode.Js && value !== Mode.Both) {
34 throw new Error(
35 `--mode must be one of: ${Mode.System}, ${Mode.Js}, ${Mode.Both}; ` +
36 `got "${value}"`,
37 );
38 }
39
40 return value;
41}
42
43export function parseSampleRate(value: string | undefined): number {
44 if (value === undefined) {

Callers 2

resolveAndValidateArgsFunction · 0.90
args.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected