deployment-tools
Version:
A Node.js scripts that helps you to compile and deploy the static assets (CSS/JavaScript/images) of your website without gulp and grunt using Node.js and npm scripts
19 lines (15 loc) • 423 B
JavaScript
/**
* Format a Date Object into HH:MM:SS
* @param {Date} time A date object
* @return {String} A String formatted date
*/
const format = time => time.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, '$1');
/**
* Format now Date into [HH:MM:SS]
* @return {String} A String formatted date
*/
const getDateString = () => `[${format(new Date())}] `;
export {
getDateString,
format,
};