Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Shay <xavier@rhnh.net>2009-12-07 07:44:41 +0300
committerRyan Dahl <ry@tinyclouds.org>2009-12-07 12:05:18 +0300
commit756544fd28d5e7156fe7d27adc3e0265268fd76d (patch)
tree648f5fe58e2dd56c3e21313b6f30e01d14fecc4c /lib/sys.js
parentc3e0a4bc7c89e6eace8d4652092b0a37dac65d8b (diff)
sys.inspect prints out special chars correctly (\n, \u0001, etc...)
Diffstat (limited to 'lib/sys.js')
-rw-r--r--lib/sys.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sys.js b/lib/sys.js
index 9c4dc6d944b..a2070b1fb4a 100644
--- a/lib/sys.js
+++ b/lib/sys.js
@@ -82,7 +82,7 @@ exports.inherits = process.inherits;
*/
var formatter = function(value, indent, parents) {
switch(typeof(value)) {
- case 'string': return '"' + value + '"';
+ case 'string': return JSON.stringify(value);
case 'number': return '' + value;
case 'function': return '[Function]';
case 'boolean': return '' + value;