Canaryデベロッパーツールは、console.table
とconsole.dir
のような素晴らしい機能を提供しています。これらの機能は、オブジェクトで利用可能なさまざまな機能とプロパティに関する詳細を示します。Node.jsコンソールでオブジェクトAPIを検出する方法は?
Node.js REPLでこれが何とか可能かどうかを知りたいと思います。私は、ブラウザの開発者向けツールで素晴らしい仕事いくつかの組み合わせを試してみた:
> console.dir(Promise)
[Function: Promise]
undefined
> console.log(Promise)
[Function: Promise]
undefined
> Promise
[Function: Promise]
> console.table(Promise)
TypeError: console.table is not a function
at repl:1:9
at REPLServer.defaultEval (repl.js:248:27)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.<anonymous> (repl.js:412:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:210:10)
at REPLServer.Interface._line (readline.js:549:8)
at REPLServer.Interface._ttyWrite (readline.js:826:14)
私はMDNやNode.jsのドキュメントを開くことなくノード内のこれらの機能などについてのアクセスおよびドキュメントを入手するにはどうすればよいですか?
これは素晴らしい作品です! http://pastebin.com/raw/VaxxL0BGありがとう:) –
Hmm、 '> console.dir(文字列、{showHidden:true})'私に 'TypeError:シンボル値を数値に変換できません。 –