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

same hash lol xD im trying to hash the quill object if they change so i know user done something to it #85

Open
gurachan opened this issue Oct 6, 2019 · 3 comments

Comments

@gurachan
Copy link

gurachan commented Oct 6, 2019

console.log( hash.keysMD5({date: new Date()})) this is the closest i can think.. when it reads its no new date rather than the output.. so it must change everytime ?

same even if you put delays on it all same hashes on angular XD

image

what triggered the change?

the object looks like
{ops: [ {...},{...},{...}]}

@addaleax
Copy link
Collaborator

addaleax commented Oct 7, 2019

I mean, when you’re using keysMD5 you’re explicitly saying that you don’t care about the values, so I think this is the expected result?

@gurachan
Copy link
Author

gurachan commented Oct 8, 2019

sadly but no :( should I use just md5? so I can just compare two objects using their hashes... i feel creating hashes is faster than stringify the objects to compare.. just a small thought.

@addaleax
Copy link
Collaborator

addaleax commented Oct 8, 2019

sadly but no :( should I use just md5

Yes, that would also hash the Date values.

i feel creating hashes is faster than stringify the objects to compare

That’s very unlikely. If you’re interested in checking deep equality of objects you already have in memory, I would use a library made for that purpose.

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