Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 604 Bytes

File metadata and controls

37 lines (24 loc) · 604 Bytes

util.log DEP0059

This recipe transforms the usage of util.log() to use console.log().

See DEP0059.

Example

Before:

const util = require("node:util");

util.log("Hello world");

After:

console.log(new Date().toLocaleString(), "Hello world");

Before:

const { log } = require("node:util");

log("Application started");
log("Processing request");

After:

console.log(new Date().toLocaleString(), "Application started");
console.log(new Date().toLocaleString(), "Processing request");