MCPcopy
hub / github.com/laurentj/slimerjs / printObj

Function printObj

src/components/httpd.js:339–352  ·  view source on GitHub ↗

* Prints out a human-readable representation of the object o and its fields, * omitting those whose names begin with "_" if showMembers != true (to ignore * "private" properties exposed via getters/setters).

(o, showMembers)

Source from the content-addressed store, hash-verified

337 * "private" properties exposed via getters/setters).
338 */
339function printObj(o, showMembers)
340{
341 var s = "******************************\n";
342 s += "o = {\n";
343 for (var i in o)
344 {
345 if (typeof(i) != "string" ||
346 (showMembers || (i.length > 0 && i[0] != "_")))
347 s+= " " + i + ": " + o[i] + ",\n";
348 }
349 s += " };\n";
350 s += "******************************";
351 dumpn(s);
352}
353
354/**
355 * Instantiates a new HTTP server.

Callers

nothing calls this directly

Calls 1

dumpnFunction · 0.85

Tested by

no test coverage detected