'use strict';
/**
* A place to debug an object from an isml file
* Useful to pass in pdict to see what it contains
*
* @param debugObject Object you'd like to see in the debugger
* @param debugLabel Optional label for the debugObject
*
**/
function debug(debugObject, debugLabel) {
// debugObject and debugLabel will show in debugger
return true; // put breakpoint here
}
/**
* Allows you to console.log from within a backend script or isscript block
* Exposes some of the built in console logging methods
* Pass in as many arguments as you'd like, they'll get output in a comma delimted list
*/
var console = function() {
var str = function(args) {
var temp = '';
// loop through arguments and add argument to string
for (var i = 0, j = args.length; i < j; i++){
var comma = ((i === 0) ? '' : ', ');
temp = temp + comma + args[i];
}
return temp;
}
function log() {
var string = "";
response.writer.print(string);
}
function debug() {
var string = "";
response.writer.print(string);
}
function info() {
var string = "";
response.writer.print(string);
}
function warn() {
var string = "";
response.writer.print(string);
}
function error() {
var string = "";
response.writer.print(string);
}
function group() {
var string = "";
response.writer.print(string);
}
function groupEnd() {
var string = "";
response.writer.print(string);
}
return {
log: log,
debug: debug,
info: info,
warn: warn,
error: error,
group: group,
groupEnd: groupEnd
}
}();
module.exports = {
debug: debug,
console: console
}