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?
已存档?
是复刻?
已锁定?
是镜像?
是私有?