Skip to content

var_dump or print_r array or object in javascript

Notifications You must be signed in to change notification settings

jiaju99/js-print_r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 

Repository files navigation

var_dump or print_r array or object in javascript

var_dump or print_r array or object in javascript, as PHP print_r() does.

打印输出 js对象数组 函数, 模仿php的print_r()

a0printr.js-20171219gz

Github: https://github.com/jiaju99/js-print_r
Author: http://feilong.org

what, now what to output. default none
gap, to insert before output

举例

/** On your project,Use uglified a0printr **/

/* eg. have a test */ var arr = []; arr['0'] = ['i', 'love', 'you','baby']; arr['1'] = ['a', 'b', 'c','d']; arr['1'][1] = {a:'6y', b:'9z'}; arr['2'] = {'k0':'va','k1':'vb'}; arr['3'] = {}; arr['4'] = null; arr['5'] = [false, true, true,true];

var arrTree1=a0printr(arr); console.log(arrTree1);

var arrTree2=a0printr(arr,'----'); console.log(arrTree2);

var arrTree3=a0printr(arr,' '); console.log(arrTree3);

About

var_dump or print_r array or object in javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages