util: show meaningful values for boxed primitives
authorNathan Rajlich <nathan@tootallnate.net>
Thu, 6 Feb 2014 02:09:23 +0000 (18:09 -0800)
committerFedor Indutny <fedor.indutny@gmail.com>
Thu, 6 Feb 2014 10:19:47 +0000 (14:19 +0400)
commit8874a317484b8865c5fbad74d3af6155994df583
tree9c381116315eec710dd382225f645bd96fefb6bf
parentf1de13b8ab77f1bcab0d7cffee140a264cae4cce
util: show meaningful values for boxed primitives

Before, `new String('foo')` would be inspected as `"{}"` which
is simply not very helpful. Now, a more meaningful
`"[String: 'foo']"` result will be returned from `util.inspect()`.

Boxed String, Boolean, and Number types are all supported.

Closes #7047
lib/util.js
test/simple/test-util-inspect.js