MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / toOptionalBoolean

Function toOptionalBoolean

src/core/embeddings.ts:155–161  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

153}
154
155function toOptionalBoolean(value: string | undefined): boolean | undefined {
156 if (!value) return undefined;
157 const normalized = value.trim().toLowerCase();
158 if (normalized === "true" || normalized === "1" || normalized === "yes") return true;
159 if (normalized === "false" || normalized === "0" || normalized === "no") return false;
160 return undefined;
161}
162
163function getEmbedRuntimeOptions(): EmbedRuntimeOptions | undefined {
164 if (EMBED_PROVIDER === "openai") return undefined;

Callers 1

getEmbedRuntimeOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected