Last Updated: February 25, 2016
·
444
· victorbstan

Formatted Console Log in JavaScript / NodeJS

var util = require('util');

console.flog = function(data) {
    var options = {
        showHidden: false,
        depth: null,
        colors: true
    };
    return console.log(util.inspect(data, options));
};