Skip to content

Commit

Permalink
[wip] Rename symbol and add vscode settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
leonjza committed Sep 21, 2018
1 parent 01f691b commit 79da606
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.tabSize": 2
}
4 changes: 2 additions & 2 deletions agent/src/lib/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export namespace colors {
export const randc = (): number => colorArray[Math.floor(Math.random() * colorArray.length)];

// return an ansified string
export const ansifyString = (color: number, ...msg: string[]): string =>
export const ansify = (color: number, ...msg: string[]): string =>
base.replace(`%d`, color.toString()) + msg.join(``) + reset;

// tslint:disable-next-line:no-console
export const log = (color: number, ...msg: string[]): void => console.log(ansifyString(color, ...msg));
export const log = (color: number, ...msg: string[]): void => console.log(ansify(color, ...msg));
}

0 comments on commit 79da606

Please sign in to comment.