Skip to content

Possibly warn about recursive objects #2

Description

@nullivex

If a recursive object is accidentally passed to this function it will result in the dreaded maximum call stack exceeded error with virtually no debug information.

I have written the following package: https://github.com/snailjs/object-manage that utilizes this tool for merges after testing a few different solutions.

I ended up implemented a depth warning that prints a stack trace before merging a deep object. I dont think its the perfect solution but it at least gives a stack trace that can be used to figure out where the bad object is coming from.

I am wondering if this is something that could be supported here rather than downstream in my package.

I would be will to submit a pull request if there is any interest in this.

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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