The original util.inspect always looks wether an object has the
inspect property defined as a function. If it is, then it calls it and
prints the result instead of the literal representation.
Classes like Buffer have inspect defined so when you do:
console.log( { some: Buffer(2) } )
you get:
I think eyes should respect this, or at least have an option to
do so. The style applied should be the other style, since what
inspect returns is often not a literal representation.
The original
util.inspectalways looks wether an object has theinspectproperty defined as a function. If it is, then it calls it andprints the result instead of the literal representation.
Classes like
Bufferhaveinspectdefined so when you do:you get:
I think
eyesshould respect this, or at least have an option todo so. The style applied should be the
otherstyle, since whatinspectreturns is often not a literal representation.