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

camelcase-keys doesn't support circular object #127

Open
bglimepoint opened this issue Jun 28, 2024 · 0 comments
Open

camelcase-keys doesn't support circular object #127

bglimepoint opened this issue Jun 28, 2024 · 0 comments

Comments

@bglimepoint
Copy link

bglimepoint commented Jun 28, 2024

Hello :-)

camelcase-keys currently doesn't support circular objects - is that something that you'd be open to it supporting?

A simple reproduction is:

import camelcaseKeys from 'camelcase-keys'

const x = {}
x.data = x

camelcaseKeys(x, { deep: true }) // fails with RangeError: Maximum call stack size exceeded.

We've poc'd an implementation by allowing map-obj to take the isSeen argument from external and calling it akin to bglimepoint@1d74d5c (paired with bglimepoint/map-obj@6fb5d38), but weren't sure if you'd be open to doing something akin to that :-) (Or if there might be a better way to achieve it :-) )

Thanks for your time :-)

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

1 participant