MCPcopy
hub / github.com/NateBJones-Projects/OB1 / asString

Function asString

integrations/enhanced-mcp/_shared/helpers.ts:69–71  ·  view source on GitHub ↗
(value: unknown, fallback: string)

Source from the content-addressed store, hash-verified

67// ── Type coercion helpers ──────────────────────────────────────────────────
68
69export function asString(value: unknown, fallback: string): string {
70 return typeof value === "string" ? value : fallback;
71}
72
73export function asNumber(value: unknown, fallback: number, min: number, max: number): number {
74 const parsed = Number(value);

Callers 5

index.tsFile · 0.90
readChatCompletionTextFunction · 0.70
readAnthropicTextFunction · 0.70
sanitizeMetadataFunction · 0.70
prepareThoughtPayloadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…