dry-ts
Version:
Find candidate duplicate TypeScript code by comparing normalized AST structure.
9 lines (8 loc) • 416 B
JavaScript
// Single source of truth for the output formats. The CLI's --format validator
// (Options.formatValue) and the config validator (Config.outputFormat) both test
// membership against this array, so adding a format never silently diverges
// between the two surfaces.
export const OUTPUT_FORMATS = ["text", "edn", "json", "sarif"];
export function isOutputFormat(value) {
return OUTPUT_FORMATS.includes(value);
}