console.dir(obj[, options])

    obj 上使用 util.inspect() 并将结果字符串打印到 stdout。 此函数绕过在 obj 上定义的任何自定义 inspect() 函数。

    • obj <any>
    • options <Object>
      • showHidden <boolean> If true then the object's non-enumerable and symbol properties will be shown too. Default: false.
      • depth <number> Tells util.inspect() how many times to recurse while formatting the object. This is useful for inspecting large complicated objects. To make it recurse indefinitely, pass null. Default: 2.
      • colors <boolean> If true, then the output will be styled with ANSI color codes. Colors are customizable; see customizing util.inspect() colors. Default: false.

    Uses util.inspect() on obj and prints the resulting string to stdout. This function bypasses any custom inspect() function defined on obj.