Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed May 2, 2024
1 parent e97ef25 commit 6ca0324
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export function disableColor(): void {
}

function format(args: any[], start: number, end: number): string {
return enabled ? `\u001B[${start}m${args.join(" ")}\u001B[${end}m` : args.join(" ");
const content = args.join(" ");
return enabled ? `\u001B[${start}m${content}\u001B[${end}m` : content;
}

export const reset = (...args: any[]): string => format(args, 0, 0);
Expand Down

0 comments on commit 6ca0324

Please sign in to comment.