fairmont
Advanced tools
Comparing version 1.0.0-beta-11 to 1.0.0-beta-12
@@ -22,3 +22,3 @@ // Generated by CoffeeScript 1.9.3 | ||
describe("Array functions", function(context) { | ||
var cat, difference, dupes, first, includes, intersection, last, range, remove, rest, second, shuffle, slice, third, union, uniq, unique, unique_by; | ||
var cat, complement, difference, dupes, first, includes, intersection, last, range, remove, rest, second, shuffle, slice, third, union, uniq, unique, unique_by; | ||
cat = detach(Array.prototype.concat); | ||
@@ -156,2 +156,12 @@ context.test("cat", function() { | ||
}); | ||
complement = curry(function(ax, bx) { | ||
return ax.filter(function(c) { | ||
return !(indexOf.call(bx, c) >= 0); | ||
}); | ||
}); | ||
context.test("complement", function() { | ||
return (function(ax, bx) { | ||
return assert(deep_equal(complement(ax, bx), [1, 2])); | ||
})([1, 2, 3, 4], [3, 4, 5, 6]); | ||
}); | ||
remove = function(array, element) { | ||
@@ -158,0 +168,0 @@ var index, ref3; |
{ | ||
"name": "fairmont", | ||
"version": "1.0.0-beta-11", | ||
"version": "1.0.0-beta-12", | ||
"description": "A collection of useful functions and utilities.", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
127290
2333