Skip to content

depth option #64

Open
Open
@sheremet-va

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions