MCPcopy Create free account
hub / github.com/dataform-co/dataform / output

Function output

cli/console.ts:21–29  ·  view source on GitHub ↗
(text: string, ansiColorCode: number)

Source from the content-addressed store, hash-verified

19});
20
21function output(text: string, ansiColorCode: number): string {
22 if (noColor) {
23 return text;
24 }
25
26 // Uses ANSI escape color codes.
27 // https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
28 return `\x1b[${ansiColorCode}m${text}\x1b[0m`;
29}
30
31const successOutput = (text: string) => output(text, ansiColorCodes.green);
32const warningOutput = (text: string) => output(text, ansiColorCodes.yellow);

Callers 4

successOutputFunction · 0.85
warningOutputFunction · 0.85
errorOutputFunction · 0.85
calloutOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected