Skip to content

toFunctionName

function toFunctionName(raw): string;

Defined in: core/src/utils/utils.functions.ts:65

Converts an arbitrary string into a valid, JavaScript-style camelCase identifier suitable for use as a sandbox action function name — e.g. notes_sendMessage becomes notesSendMessage. A leading digit, a reserved word, or empty input is prefixed with _.

Note: distinct inputs can collapse to the same output (e.g. send-message and sendMessage both become sendMessage). Callers building a name→action map must dedupe.

Parameter Type
raw string

string