MCPcopy Create free account
hub / github.com/denoland/std / aliasIsBoolean

Function aliasIsBoolean

cli/parse_args.ts:485–494  ·  view source on GitHub ↗
(
  aliasMap: Map<string, Set<string>>,
  booleanSet: Set<string>,
  key: string,
)

Source from the content-addressed store, hash-verified

483}
484
485function aliasIsBoolean(
486 aliasMap: Map<string, Set<string>>,
487 booleanSet: Set<string>,
488 key: string,
489): boolean {
490 const set = aliasMap.get(key);
491 if (set === undefined) return false;
492 for (const alias of set) if (booleanSet.has(alias)) return true;
493 return false;
494}
495
496function isBooleanString(value: string) {
497 return value === "true" || value === "false";

Callers 1

parseArgsFunction · 0.85

Calls 2

getMethod · 0.65
hasMethod · 0.65

Tested by

no test coverage detected