MCPcopy Index your code
hub / github.com/changesets/changesets / format

Function format

packages/logger/src/index.ts:6–16  ·  view source on GitHub ↗
(args: Array<any>, customPrefix?: string)

Source from the content-addressed store, hash-verified

4export let prefix = "🦋 ";
5
6function format(args: Array<any>, customPrefix?: string) {
7 let fullPrefix =
8 prefix + (customPrefix === undefined ? "" : " " + customPrefix);
9 return (
10 fullPrefix +
11 util
12 .format("", ...args)
13 .split("\n")
14 .join("\n" + fullPrefix + " ")
15 );
16}
17
18export function error(...args: Array<any>) {
19 console.error(format(args, pc.red("error")));

Callers 6

errorFunction · 0.85
infoFunction · 0.85
logFunction · 0.85
successFunction · 0.85
warnFunction · 0.85
index.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected