home

Quickies, by Andrea Olivato

text

Dump any object in #javascript and read their content

Simple function that makes it possible to read the content of any #js object, converting it to a string.

function dump (arr,level) {
	var dumped_text = "";
	if(!level) level = 0;

	var level_padding = "";
	for(var j=0;j \"" + value + "\"\n";
			}
		}
	} else { 
		dumped_text = "===>"+arr+"<===("+typeof(arr)+")";
	}
	return dumped_text;
}

2 years ago

May 29, 2009
Comments (View)
blog comments powered by Disqus