MCPcopy Create free account
hub / github.com/cursor/plugins / parseBoolean

Function parseBoolean

continual-learning/hooks/continual-learning-stop.ts:48–59  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

46}
47
48function parseBoolean(value: string | undefined): boolean {
49 if (!value) {
50 return false;
51 }
52 const normalized = value.trim().toLowerCase();
53 return (
54 normalized === "1" ||
55 normalized === "true" ||
56 normalized === "yes" ||
57 normalized === "on"
58 );
59}
60
61function readEnvValue(primary: string, legacy: string): string | undefined {
62 return process.env[primary] ?? process.env[legacy];

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected