Created
March 19, 2018 16:42
-
-
Save shiv19/51addbddfffd1f16a2e215d5edb43161 to your computer and use it in GitHub Desktop.
remove cyclic dependency and log the object
This file contains 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
console.log = (function(log, inspect) { | |
return function() { | |
return log.apply( | |
this, | |
Array.prototype.map.call(arguments, function(arg) { | |
return inspect(arg, { | |
depth: 2 | |
showHidden: true | |
}).replace(/\\n/g, '\n') | |
}) | |
) | |
} | |
})(console.log, inspect) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment