MCPcopy Create free account
hub / github.com/discountry/ritmex-bot / requireStringOption

Function requireStringOption

src/cli/command-parser.ts:412–422  ·  view source on GitHub ↗
(
  options: Record<string, string | boolean>,
  names: string[],
  errorMessage: string
)

Source from the content-addressed store, hash-verified

410}
411
412function requireStringOption(
413 options: Record<string, string | boolean>,
414 names: string[],
415 errorMessage: string
416): string {
417 const value = readStringOption(options, names);
418 if (!value) {
419 throw new CommandParseError(errorMessage);
420 }
421 return value;
422}
423
424function readBooleanOption(options: Record<string, string | boolean>, names: string[], fallback: boolean): boolean {
425 const value = readOptionalBooleanOption(options, names);

Callers 3

parseMarketCommandFunction · 0.85
parseOrderCommandFunction · 0.85
parseOrderCreatePayloadFunction · 0.85

Calls 1

readStringOptionFunction · 0.85

Tested by

no test coverage detected