Nnodejs

nodejs/util-print-to-console-log

Handle DEP0026, DEP0027, DEP0028, DEP0029 via transforming `util.print|puts|debug|error()` to `console.log|error()`

transformationmigration
Public
21 executions
Run locally
npx codemod @nodejs/util-print-to-console-log
Documentation

util.print, util.puts, util.debug, util.error DEP0026,DEP0027,DEP0028,DEP0029

This recipe transforms the usage of log functions from util, print, puts, debug, error to use console.log() or console.error().

See DEP0026.
See DEP0027.
See DEP0028.
See DEP0029.

Example

diff

Before:

js

After:

js

Ready to contribute?

Build your own codemod and share it with the community.