cloudhead / cloudhead/eyes.js

An option to respect Object.inspect()

Open
#28 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
344
Forks
40
PR merge metrics
No merged PRs in 30d

Description

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:

``` js
console.log( { some: Buffer(2) } )
```

you get:

```
{ some: }
```

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.