MCPcopy
hub / github.com/mixedbread-ai/mgrep / parseBooleanEnv

Function parseBooleanEnv

src/commands/search.ts:130–137  ·  view source on GitHub ↗
(
  envVar: string | undefined,
  defaultValue: boolean,
)

Source from the content-addressed store, hash-verified

128}
129
130function parseBooleanEnv(
131 envVar: string | undefined,
132 defaultValue: boolean,
133): boolean {
134 if (envVar === undefined) return defaultValue;
135 const lower = envVar.toLowerCase();
136 return lower === "1" || lower === "true" || lower === "yes" || lower === "y";
137}
138
139/**
140 * Syncs local files to the store with progress indication.

Callers 1

search.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected