[Elements] are optional
Defined in
Utility/Dumper/0.1/lib.js
Class SAPO.Utility.Dumper
class
SAPO.Utility.Dumper
Inclusion link: http://js.sapo.pt/SAPO/Utility/Dumper/0.1/
Sample: http://js.sapo.pt/SAPO/Utility/Dumper/sample/
Function Summary
formats the param to display
alertDump
(Object|String|Boolean
param)
alert variable structure
print variable structure
Can be passed an output target
return variable structure
windowDump
(Object|String|Boolean
param)
print to new window the variable structure
Function Details
function _formatParam
private
String
_formatParam(Any
param)
Parameters:
param
Returns:
the argument passed formated
function _getTabs
private
String
_getTabs(Number
numberOfTabs)
Parameters:
numberOfTabs
Returns:
the tabs concatenated
function _outputFormat
private
String
_outputFormat(Any
param, Number
dim)
formats the param to display
Parameters:
param
dim
Returns:
the output format
function alertDump
alertDump(Object|String|Boolean
param)
alert variable structure
Parameters:
param
function printDump
printDump(Object|String|Boolean
param, [String|Object
target])
print variable structure
Can be passed an output target
Parameters:
param
[target]
(can be an element ID or an element) function returnDump
String
returnDump(Object|String|Boolean
param)
return variable structure
Parameters:
param
Returns:
variable structure
function windowDump
windowDump(Object|String|Boolean
param)
print to new window the variable structure
Parameters:
param
var obj = { key1: 'value1', key2: 'value2', keyArray: ['arrayValue1', 'arrayValue2', 'arrayValue3'] } SAPO.Utility.Dumper.printDump(obj); SAPO.Utility.Dumper.printDump(obj, 'target_element_id'); SAPO.Utility.Dumper.alertDump(obj); SAPO.Utility.Dumper.windowDump(obj); alert(SAPO.Utility.Dumper.returnDump(obj));