MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / optionalString

Function optionalString

projects/runtime-node/src/agents.ts:342–344  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

340}
341
342function optionalString(value: unknown): string | undefined {
343 return typeof value === "string" && value.length > 0 ? value : undefined
344}
345
346function optionalPositiveInteger(value: unknown): number | undefined {
347 return typeof value === "number" && Number.isInteger(value) && value > 0 ? value : undefined

Calls

no outgoing calls

Tested by

no test coverage detected