MCPcopy Index your code
hub / github.com/simstudioai/sim / formatParameterNameForError

Function formatParameterNameForError

apps/sim/tools/utils.ts:147–154  ·  view source on GitHub ↗

* Formats a parameter name for user-friendly error messages * Converts parameter names and descriptions to more readable format

(paramName: string)

Source from the content-addressed store, hash-verified

145 * Converts parameter names and descriptions to more readable format
146 */
147function formatParameterNameForError(paramName: string): string {
148 // Split camelCase and snake_case/kebab-case into words, then capitalize first letter of each word
149 return paramName
150 .split(/(?=[A-Z])|[_-]/)
151 .filter(Boolean)
152 .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
153 .join(' ')
154}
155
156/**
157 * Validates required parameters after LLM and user params have been merged

Callers 1

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected