MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / normalizePromptExamples

Function normalizePromptExamples

src/job-config.ts:38–49  ·  view source on GitHub ↗
(promptExamples: string[] | undefined)

Source from the content-addressed store, hash-verified

36}
37
38function normalizePromptExamples(promptExamples: string[] | undefined): string[] | undefined {
39 if (!Array.isArray(promptExamples)) {
40 return undefined;
41 }
42
43 const normalized = promptExamples
44 .filter((value): value is string => typeof value === "string")
45 .map((value) => value.trim())
46 .filter(Boolean);
47
48 return normalized.length > 0 ? normalized : undefined;
49}
50
51function validateScheduledJobConfig(
52 value: unknown,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected