MCPcopy Index your code
hub / github.com/code-pushup/cli / answerString

Function answerString

packages/utils/src/lib/plugin-answers.ts:4–10  ·  view source on GitHub ↗
(
  answers: Record<string, PluginAnswer>,
  key: string,
)

Source from the content-addressed store, hash-verified

2
3/** Extracts a string value from a plugin answer, defaulting to `''`. */
4export 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. */
13export function answerArray(

Callers 5

parseAnswersFunction · 0.90
parseAnswersFunction · 0.90
parseAnswersFunction · 0.90
parseAnswersFunction · 0.90
parseAnswersFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected