jsvardump
v1.0.2
Published
Output javascript object like PHP(var_dump) using console.log.
Downloads
7
Readme
jsvardump
Output javascript object like PHP(var_dump) using console.log.
Install
$ npm install jsvardump
Usage
var jvd = require('jsvardump');
var object = {
arr: [[1,11,111,{hoge:'aaa', fuga:'bbb'}], 'ccc', 'ddd'],
obj: {'key': 'value', 'date': Date.now(), 'func': function(){console.log(1);}},
str: 'some string'
};
jvd.dump(object);
console output
object
├─ arr
│ ├─ 0
│ │ ├─ 0:1
│ │ ├─ 1:11
│ │ ├─ 2:111
│ │ └─ 3
│ │ ├─ hoge:aaa
│ │ └─ fuga:bbb
│ ├─ 1:ccc
│ └─ 2:ddd
├─ obj
│ ├─ key:value
│ ├─ date:1446602447382
│ └─ func:function
└─ str:some string