( answers: Record<string, PluginAnswer>, key: string, )
| 2 | |
| 3 | /** Extracts a string value from a plugin answer, defaulting to `''`. */ |
| 4 | export function answerString( |
| 5 | answers: Record<string, PluginAnswer>, |
| 6 | key: string, |
| 7 | ): string { |
| 8 | const value = answers[key]; |
| 9 | return typeof value === 'string' ? value : ''; |
| 10 | } |
| 11 | |
| 12 | /** Extracts a string array from a plugin answer, splitting CSV strings as fallback. */ |
| 13 | export function answerArray( |
no outgoing calls
no test coverage detected