MCPcopy Create free account
hub / github.com/chhoumann/quickadd / canonicalizeOnePageFileValue

Function canonicalizeOnePageFileValue

src/utils/fileSyntax.ts:232–241  ·  view source on GitHub ↗
(
	value: string,
	validPicks: Iterable<string>,
)

Source from the content-addressed store, hash-verified

230 * stays empty (an intentional skip).
231 */
232export function canonicalizeOnePageFileValue(
233 value: string,
234 validPicks: Iterable<string>,
235): string {
236 if (!value) return value;
237 for (const pick of validPicks) {
238 if (value === pick) return value;
239 }
240 return `${FILE_CUSTOM_PREFIX}${value}`;
241}
242
243/** Decode a stored FILE variable value into its representation kind. */
244export function decodeFileValue(stored: unknown): DecodedFileValue {

Callers 2

fileSyntax.test.tsFile · 0.90
runOnePagePreflightFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected