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

Function toOptionalInteger

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

Source from the content-addressed store, hash-verified

147}
148
149function toOptionalInteger(value: string | undefined): number | undefined {
150 if (!value) return undefined;
151 const parsed = Number.parseInt(value, 10);
152 return Number.isFinite(parsed) ? parsed : undefined;
153}
154
155function toOptionalBoolean(value: string | undefined): boolean | undefined {
156 if (!value) return undefined;

Callers 1

getEmbedRuntimeOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected