Skip to content

Output javascript object like PHP(var_dump) using console.log.

License

Notifications You must be signed in to change notification settings

Kurom96/jsvardump

Repository files navigation

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

About

Output javascript object like PHP(var_dump) using console.log.

Resources

License

Stars

Watchers

Forks

Packages

No packages published