UNPKG

@ryanburnette/console-log-util-inspect

Version:

Console.log the util.inspect of an object with some defaults. Console log it all.

18 lines (14 loc) 332 B
'use strict'; var util = require('util'); var merge = require('@ryanburnette/merge'); var defaults = { showHidden: false, depth: null, colors: true, compact: false }; module.exports = function (obj, options) { options = options || {}; options = merge(defaults, options); console.log(util.inspect(obj, options)); };