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

fix: deepEqual validator #48

Merged
merged 1 commit into from
Dec 29, 2021

Conversation

VikalpP
Copy link
Contributor

@VikalpP VikalpP commented Sep 23, 2021

fixes #47

Problem:

Logically it was returning the comparison of the last key field.

Solution:

Comparision should end as soon as any of the key fields is not equal, and return false.

How to test?

const senderMenuItems = [ {text: 'Send', icon: 'trash'} ]
const receiverMenuItems = [ {text: 'Receiver', icon: 'trash'} ]
deepEqual(senderMenuItems, receiverMenuItems) // should return false

@enesozturk
Copy link
Owner

Hi @VikalpP, I know it's been a long to but thank you for the contribution. This is great!

@enesozturk enesozturk merged commit 2118022 into enesozturk:main Dec 29, 2021
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

Successfully merging this pull request may close these issues.

deepEqual validation is buggy
3 participants