[go: nahoru, domu]

Skip to content

Commit

Permalink
Remove WebUtil.dirObj
Browse files Browse the repository at this point in the history
`WebUtil.dirObj` wasn't being used anywhere, so this removes it.
  • Loading branch information
DirectXMan12 committed Mar 7, 2017
1 parent 6cae7b5 commit bc35b1d
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions app/webutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,6 @@ WebUtil.init_logging = function (level) {
Util.init_logging();
};


WebUtil.dirObj = function (obj, depth, parent) {
"use strict";
if (! depth) { depth = 2; }
if (! parent) { parent = ""; }

// Print the properties of the passed-in object
var msg = "";
for (var i in obj) {
if ((depth > 1) && (typeof obj[i] === "object")) {
// Recurse attributes that are objects
msg += WebUtil.dirObj(obj[i], depth - 1, parent + "." + i);
} else {
//val = new String(obj[i]).replace("\n", " ");
var val = "";
if (typeof(obj[i]) === "undefined") {
val = "undefined";
} else {
val = obj[i].toString().replace("\n", " ");
}
if (val.length > 30) {
val = val.substr(0, 30) + "...";
}
msg += parent + "." + i + ": " + val + "\n";
}
}
return msg;
};

// Read a query string variable
WebUtil.getQueryVar = function (name, defVal) {
"use strict";
Expand Down

0 comments on commit bc35b1d

Please sign in to comment.