cdir

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

  • 所有者: heapwolf/cdir
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

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.

主要指標

概覽
名稱與所有者heapwolf/cdir
主編程語言JavaScript
編程語言JavaScript (語言數: 1)
平台
許可證
所有者活动
創建於2012-04-20 06:19:27
推送於2016-04-01 23:38:04
最后一次提交2016-04-01 12:45:45
發布數10
最新版本名稱v0.1.1 (發布於 )
第一版名稱v0.0.2 (發布於 )
用户参与
星數269
關注者數8
派生數18
提交數68
已啟用問題?
問題數18
打開的問題數7
拉請求數13
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?