Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatted output with indents? #27

Closed
vatosarmat opened this issue Nov 14, 2019 · 1 comment · Fixed by #13
Closed

Formatted output with indents? #27

vatosarmat opened this issue Nov 14, 2019 · 1 comment · Fixed by #13

Comments

@vatosarmat
Copy link

Hello. Currently object-inspect always represents object as single line.

{ a: 1, b: [ 3, 4, undefined, null ], c: undefined, d: null, e: { regex: /^x/i, buf: <Buffer 61 62 63>, holes: [ 'a', 'b', , , 'e', , 'g' ] }, now: Thu Nov 14 2019 20:59:42 GMT+1000 (Vladivostok Standard Time), self: [Circular] }

How about adding the ability to produce formatted output?

{
  a: 1,
  b: [ 3, 4, undefined, null ],
  c: undefined,
  d: null,
  e: {
    regex: /^x/i,
    buf: <Buffer 61 62 63>,
    holes: [ 'a', 'b', <2 empty items>, 'e', <1 empty item>, 'g' ]
  },
  now: 2019-11-14T10:59:42.159Z,
  self: [Circular]
}
@ljharb
Copy link
Member

ljharb commented Nov 14, 2019

See #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants