queckezz / fmt-obj

Stringifies any javascript object in your console for CLI inspection :sparkles:
MIT License
443 stars 16 forks source link

Better array support. #2

Closed jordonbiondo closed 7 years ago

jordonbiondo commented 7 years ago

It would be great if the package descended into arrays and printed the formated output of each element rather than .join-ing their string representations. Ideally an array of objects would print the fully formatted value of each object indented further.

Consider the differences shown below.

Using fmt-obj: on {asdf: [{a: 3, b: 4}, {x: 10}]}


    asdf: "[object Object],[object Object]"

Using the prettyjson library:

asdf: 
  - 
    a: 3
    b: 4
  - 
    x: 10
queckezz commented 7 years ago

Thanks for the feedback. I just released 1.2.0 with better array support :sparkles:. Can you try it out and see what you think of it?

example of how it looks now image