An interactive console.dir() for the terminal.
An interactive representation of an object for the CLI similar to that of console.dir() in webkit.
Why? Sometimes you have a lot of data that gets dumped to the screen. It's hard to keep track of it visually. A lot of the time you are just looking for one item in a sea of data. Progressive disclosure helps.
First, require the module. Then use
console.dir(somecode) in your program and then use
shift+tab to cycle through the object's members. You can hit
enter to expand a member. See the example below.
q to quit!
There is a CLI version too if you want to use it.
npm install cdir -g.
consoledir = require'../dir';var stuff ="name" : "dir""description" : "An interactive console.dir() for the terminal.""tags" :"console""debug""debugging""json""interacive""prompt"return "node tests/test.js";consoledirstuff;
The output looks something like this.