cdir

An interactive console.dir() for node.js similar to console.dir() in webkit.

  • Owner: heapwolf/cdir
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

Synopsis

An interactive representation of an object for the CLI similar to that of console.dir() in webkit.

Motivation

Reading big object dumps is a waste of time. Progressive disclosure helps.

Features

  • Searchable/Repeat search
  • Handles cyclical references
  • Expand and collapse nodes

Usage

Install

Do npm install cdir -g and then require the module in your program like this console.dir = require('cdir').

Use console.dir(someobject) somewhere in your program and then hit tab, shift+tab or the arrow keys to cycle through the object's members. You can hit space, return or enter to expand a member.

Search by pressing the / key. This will display a / prompt. If you have already searched for something it will be displayed before the / prompt. For instance if you searched for "foobar" it would appear as (foobar) /.

Quit

Hit ctrl+c or q to quit!

Simple Example

There is a CLI version too if you want to use it. npm install cdir -g.


console.dir = require('cdir');

var stuff = { 
  "name" : "cdir", 
  "description" : "An interactive console.dir() for the terminal.",
  "tags" : [
    "console",
    "debug",
    "debugging",
    "json",
    "interacive",
    "prompt"
  ],
  "foo": function() { 
    return "node tests/test.js"
  }
};

console.dir(stuff);

The output looks something like this.

Main metrics

Overview
Name With Ownerheapwolf/cdir
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 1)
Platform
License:
所有者活动
Created At2012-04-20 06:19:27
Pushed At2016-04-01 23:38:04
Last Commit At2016-04-01 12:45:45
Release Count10
Last Release Namev0.1.1 (Posted on )
First Release Namev0.0.2 (Posted on )
用户参与
Stargazers Count269
Watchers Count8
Fork Count18
Commits Count68
Has Issues Enabled
Issues Count18
Issue Open Count7
Pull Requests Count13
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private