Skip to content

Function: normalizeSelectionString()

Makaio Framework


Makaio Framework / services-core / normalizeSelectionString

normalizeSelectionString(value): string | undefined

Defined in: ../../../packages/services/core/src/session/selection-utils.ts:22

Normalize a selection string field by trimming whitespace and coercing blank strings to undefined.

Used wherever adapter/agent selection strings are read from wire payloads to ensure callers cannot accidentally pass whitespace-only values as meaningful adapter names or IDs.

string | undefined

Candidate string value from a selection payload field

string | undefined

Trimmed non-empty string, or undefined when the input is absent or contains only whitespace