あいつの日誌β

働きながら旅しています。

console.log で階層(depth)を指定する方法

もう何回も検索しているのでメモ

const util = require('util')
console.log(util.inspect(obj, {depth: 0}));