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

depth option #64

Open
sheremet-va opened this issue Jun 28, 2023 · 1 comment
Open

depth option #64

sheremet-va opened this issue Jun 28, 2023 · 1 comment

Comments

@sheremet-va
Copy link

I wasn't able to find any documentation about the options. From the description, I would assume it works somewhat similar to Node.js inspect:

It's similar to Node.js' util.inspect() function, but it works cross platform, in most modern browsers as well as Node.

But it looks like this package doesn't support depth option correctly. From my experience:

const nestedObj = { n: { a: { b: { c: { d: { e: '3' } } } } } }

loupe(nestedObj)
// prints this:
// { n: { a: { b: { c: { d: { e: '3' } } } } } }


util.inspect(nestedObj)
// prints this:
 // { n: { a: { b: [Object] } } }

Is this intentional? If I pass down depth: 2 manually, I still get the full object printed.

@keithamus
Copy link
Member

depth has yet to be implemented. PRs welcome!

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

No branches or pull requests

2 participants