Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 1.11 KB

README.md

File metadata and controls

51 lines (40 loc) · 1.11 KB

jsvardump

Circle CI Coverage Status

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

License

MIT