Last active
October 5, 2018 04:45
-
-
Save bolasblack/aa1df7eee812f2743bcf2d10c41f105e to your computer and use it in GitHub Desktop.
nodejs unlimited console.log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const util = require('util') | |
| module.exports.global = () => { | |
| util.inspect.defaultOptions.maxArrayLength = null | |
| util.inspect.defaultOptions.depth = null | |
| } | |
| module.exports.consoleJson = () => | |
| console.json = (...args) => | |
| console.log.apply(console, args.map(arg => | |
| util.inspect(arg, {depth: null, maxArrayLength: null}) | |
| )) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment