mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Issue #309, adding symmetric difference as _.symDifference, and making _.difference accept any number of arguments.
This commit is contained in:
@@ -110,6 +110,14 @@ $(document).ready(function() {
|
||||
test("arrays: difference", function() {
|
||||
var result = _.difference([1, 2, 3], [2, 30, 40]);
|
||||
equals(result.join(' '), '1 3', 'takes the difference of two arrays');
|
||||
|
||||
var result = _.difference([1, 2, 3, 4], [2, 30, 40], [1, 11, 111]);
|
||||
equals(result.join(' '), '3 4', 'takes the difference of three arrays');
|
||||
});
|
||||
|
||||
test("arrays: symDifference", function() {
|
||||
var result = _.symDifference([1, 2, 3], [2, 22, 222], [3, 33, 333], [222, 333, 444], [5]);
|
||||
equals(result.join(' '), '1 22 33 444 5', 'takes the symmetric difference');
|
||||
});
|
||||
|
||||
test('arrays: zip', function() {
|
||||
|
||||
Reference in New Issue
Block a user