MCPcopy Index your code
hub / github.com/remix-run/react-router / logBullet

Function logBullet

packages/create-react-router/utils.ts:107–132  ·  view source on GitHub ↗
(
  logger: typeof log | typeof logError,
  colorizePrefix: (v: string) => string,
  colorizeText: (v: string) => string,
  symbol: string,
  prefix: string,
  text?: string | string[],
)

Source from the content-addressed store, hash-verified

105}
106
107function logBullet(
108 logger: typeof log | typeof logError,
109 colorizePrefix: (v: string) => string,
110 colorizeText: (v: string) => string,
111 symbol: string,
112 prefix: string,
113 text?: string | string[],
114) {
115 let textParts = Array.isArray(text) ? text : [text || ""].filter(Boolean);
116 let formattedText = textParts
117 .map((textPart) => colorizeText(textPart))
118 .join("");
119
120 if (process.stdout.columns < 80) {
121 logger(
122 `${" ".repeat(5)} ${colorizePrefix(symbol)} ${colorizePrefix(prefix)}`,
123 );
124 logger(`${" ".repeat(9)}${formattedText}`);
125 } else {
126 logger(
127 `${" ".repeat(5)} ${colorizePrefix(symbol)} ${colorizePrefix(
128 prefix,
129 )} ${formattedText}`,
130 );
131 }
132}
133
134export function debug(prefix: string, text?: string | string[]) {
135 logBullet(log, color.yellow, color.dim, "●", prefix, text);

Callers 4

debugFunction · 0.85
infoFunction · 0.85
successFunction · 0.85
errorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…