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

Won't trycatch different types #15

Merged
merged 1 commit into from Aug 3, 2019

Conversation

@KoryNunn
Copy link
Contributor

commented Sep 23, 2014

The current version will hit the trycatch in objEquiv if you compare, for example, false to []

This should significantly improve the performance of checks between values of different types.

Tests pass, however I'm not totally confident that there are enough tests to catch potential edge cases.

@KoryNunn

This comment has been minimized.

Copy link
Contributor Author

commented Dec 17, 2014

The failed build looks unrelated to the pull.

@ljharb

This comment was marked as resolved.

Copy link
Collaborator

commented Jul 31, 2019

@KoryNunn would you mind checking "allow edits" on the RHS of this PR?

@KoryNunn

This comment was marked as resolved.

Copy link
Contributor Author

commented Aug 1, 2019

Done. I've also resolved the conflicts

@ljharb

This comment has been minimized.

Copy link
Collaborator

commented Aug 1, 2019

hmm - how does this affect comparing a function to an object? that's the one case I'd be worried about.

@ljharb

This comment has been minimized.

Copy link
Collaborator

commented Aug 3, 2019

nvm, looked at https://github.com/nodejs/node/blob/master/lib/internal/util/comparisons.js and added some tests to this PR.

@ljharb

ljharb approved these changes Aug 3, 2019

@ljharb ljharb merged commit 410e2d6 into substack:master Aug 3, 2019

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.