isEqual
does not works if one object has circular references
#114
Labels
bug
Something isn't working
isEqual
does not works if one object has circular references
#114
Environment
ohash v2.0.2
Node v23.8.0
Reproduction
Added failing tests for
serialize()
: https://github.com/zsilbi/ohash/tree/test-serialize-consistencyDescribe the bug
I switched to
isEqual()
from an older library in one of my projects, but it does not behave as I expected. Objects with the same structure are indexed based on their reference, leading to differences in their serialized form.This indexing feature helps handle circular references but makes
isEqual()
unreliable for my use case.Would it be possible to improve this behavior, or should the documentation be updated to clarify the exact mechanics of this function?
The text was updated successfully, but these errors were encountered: