mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
10 lines
331 B
TypeScript
10 lines
331 B
TypeScript
/**
|
|
* Logs a message to the console with a timestamp.
|
|
* @param {string} msg - The message to log.
|
|
* @param {...any} args - Additional arguments to log.
|
|
*/
|
|
export function log(msg: string, ...args: any[]) {
|
|
const time = new Date().toLocaleTimeString("en-US", { hour12: false });
|
|
console.log(`[${time}] ${msg}`, ...args);
|
|
}
|