MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / applyBooleanOption

Function applyBooleanOption

scripts/cli-options.ts:56–68  ·  view source on GitHub ↗
(
  arg: string,
  parsed: Parsed,
  booleanOptions: Map<string, BooleanKey>,
)

Source from the content-addressed store, hash-verified

54}
55
56function applyBooleanOption<Parsed extends object, BooleanKey extends keyof Parsed & string>(
57 arg: string,
58 parsed: Parsed,
59 booleanOptions: Map<string, BooleanKey>,
60) {
61 const option = booleanOptions.get(arg);
62 if (!option) {
63 return false;
64 }
65
66 parsed[option] = true as Parsed[BooleanKey];
67 return true;
68}
69
70function applyValueOrPositionalOption<
71 Parsed extends object,

Callers 1

parseMappedArgumentFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected