Formatting
This commit is contained in:
@@ -2,9 +2,9 @@ import util from "node:util";
|
||||
|
||||
/**
|
||||
* Text formatting utilities for the CLI.
|
||||
*
|
||||
*
|
||||
* Uses ANSI escape codes to format text.
|
||||
*
|
||||
*
|
||||
* AI Generated links:
|
||||
* @see https://en.wikipedia.org/wiki/ANSI_escape_code
|
||||
* @see https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
|
||||
@@ -30,7 +30,8 @@ const HIDDEN = "\x1b[8m";
|
||||
export const hidden = (text: string) => `${HIDDEN}${text}${RESET}`;
|
||||
|
||||
const STRIKETHROUGH = "\x1b[9m";
|
||||
export const strikethrough = (text: string) => `${STRIKETHROUGH}${text}${RESET}`;
|
||||
export const strikethrough = (text: string) =>
|
||||
`${STRIKETHROUGH}${text}${RESET}`;
|
||||
|
||||
const RESET = "\x1b[0m";
|
||||
export const reset = (text: string) => `${RESET}${text}${RESET}`;
|
||||
@@ -39,6 +40,6 @@ export const formatObject = (obj: unknown) => {
|
||||
return util.inspect(obj, {
|
||||
depth: null,
|
||||
colors: true,
|
||||
compact: false
|
||||
compact: false,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user