mirror of
https://github.com/nullnyat/NullcatChan.git
synced 2025-08-06 16:24:06 +09:00
リファクタリングなど
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
import chalk from 'chalk';
|
||||
|
||||
export default function(msg: string) {
|
||||
const now = new Date();
|
||||
const date = `${zeroPad(now.getHours())}:${zeroPad(now.getMinutes())}:${zeroPad(now.getSeconds())}`;
|
||||
console.log(`${date} ${msg}`);
|
||||
console.log(`${chalk.gray(date)} ${msg}`);
|
||||
}
|
||||
|
||||
function zeroPad(num: number, length: number = 2): string {
|
||||
|
Reference in New Issue
Block a user