mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-18 00:03:38 -05:00
15 lines
325 B
JavaScript
15 lines
325 B
JavaScript
'use strict';
|
|
const chalk = require('chalk');
|
|
|
|
const pad = n => n < 10 ? `0${n}` : n;
|
|
|
|
const currentTime = () => {
|
|
const now = new Date();
|
|
|
|
return pad(now.getHours()) + ':' + pad(now.getMinutes()) + ':' + pad(now.getSeconds());
|
|
};
|
|
|
|
exports.log = output => {
|
|
console.log(chalk.dim(`[${currentTime()}]`) + ` ${output}`);
|
|
};
|