--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
Or, you can use '%s' format pattern.
$ node
> process.version
'v0.4.9'
> console.log(new Error('Hello, World!'));
{ stack: [Getter/Setter],
arguments: undefined,
type: undefined,
message: 'Hello, World!' }
> console.log('%s', new Error('Hello, World!'));
Error: Hello, World!
Since Node v0.5.1 (V8 3.4), each property of Error was changed to unenumerated.
$ node
> process.version
'v0.5.1'
> console.log(new Error('Hello, World!'));
{}
:-<
--
{
name: "Koichi Kobayashi",
mail: "koi...@improvement.jp",
blog: "http://d.hatena.ne.jp/koichik/",
twitter: "@koichik"
}
> (...)
> I would love to see some of these improvements make it into util.inspect() and console.log(). I should find the time to properly submit patches...
http://homepage.mac.com/jorgechamorro/sys.inspect.html
--
Jorge.
So that's what node does.
a = {a:1}
require('util').inspect = require('eyes').inspector({stream:null})
console.log(a) // { a: 1 }
it also adds color :)
i forked it [1] and added hexy.js [2] , a nice hex dump printer,
to let eyes.js pretty print even buffers.
[0] https://github.com/cloudhead/eyes.js
[1] https://github.com/dodo/eyes.js
[2] https://github.com/a2800276/hexy.js