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

Consider alternatives for deep equal implementation #103

Open
dlongley opened this issue Aug 26, 2024 · 2 comments
Open

Consider alternatives for deep equal implementation #103

dlongley opened this issue Aug 26, 2024 · 2 comments

Comments

@dlongley
Copy link
Member

dlongley commented Aug 26, 2024

          Consider https://github.com/lukeed/dequal or https://nodejs.org/api/util.html#utilisdeepstrictequalval1-val2.

Originally posted by @davidlehn in #102 (comment)

Note: We don't want to pull in another library for this if we can avoid it, but using the node implementation would work. I don't know if there's something equivalent on the Web platform though.

EDIT: I forgot this is node-only -- so we should just switch over to the util.isDeepStrictEqual API.

@BigBlueHat
Copy link

FWIW, node's assert module also includes a deepStrictEqual that's rather nice:
https://nodejs.org/api/assert.html#assertdeepstrictequalactual-expected-message

Not sure if it's a fit for this use case or not, but thought I'd share.

@BigBlueHat
Copy link

Relates to fixing inline objects not working in this code:
https://github.com/digitalbazaar/bedrock-vc-delivery/blob/v5.3.3/lib/oid4/oid4vci.js#L373-L377

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