Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jashkenas/underscore
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: rcoh/underscore
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Dec 3, 2013

  1. Add support for specifying comparators in set ops

    This commit adds support for specifying comparators in union,
    difference, and intersection. The specification of comparators allows
    for library users to specify _.isEqual for deep equality or to
    specify their own methods that match a subset of paramters. It
    also adds deepUnion, deepIntersection and deepDifference functions,
    convienience functions that specify _.isEqual.
    
    Under the hood, it actually allows the specification of a "contains"
    function into several relevant relevant functions. This is created from
    the comparator with a closure. The code to allow this a little cumbersome.
    I'm open to suggestions on better methods of passing through a containment-
    checking function -- one possibility would be to store the containment
    function of the moment on this.
    
    Let me know your temperature for merging these changes.
    Russell Cohen committed Dec 3, 2013
    Configuration menu
    Copy the full SHA
    f835e42 View commit details
    Browse the repository at this point in the history
Loading