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

Added isEq to _.isEqual for proper equality checking of 0 and -0 in sets and maps #2508

Closed
wants to merge 4 commits into from

Commits on Apr 20, 2016

  1. Implemented _.isEq() method.

    _.isEq(a, b) performs a SameValueZero comparison on values a and b.
    http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero
    andrew brown committed Apr 20, 2016
    Configuration menu
    Copy the full SHA
    057633b View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2016

  1. Modified _.isEqual() to use SameValueZero logic when comparing sets a…

    …nd maps.
    
    Implemented an internal isEq function that is called by deepEq when testing equality of key values for maps or sets.  0 and -0 should be considered equal for set and keys of maps (but not values) which is why this change was needed.
    andrew brown committed Apr 21, 2016
    Configuration menu
    Copy the full SHA
    2e53862 View commit details
    Browse the repository at this point in the history
  2. Added test cases for sets and maps with keys of 0 and -0. Added strin…

    …gs with test case purpose to a couple of tests that were missing them.
    andrew brown committed Apr 21, 2016
    Configuration menu
    Copy the full SHA
    c05eefe View commit details
    Browse the repository at this point in the history

Commits on May 3, 2016

  1. Modified test.js to guard against lack of support for Set and Map in …

    …the module.js used by Travis CI
    andrew brown committed May 3, 2016
    Configuration menu
    Copy the full SHA
    f4c9859 View commit details
    Browse the repository at this point in the history