MCPcopy Create free account
hub / github.com/Wisembly/basil.js / _difference

Function _difference

src/basil.set.js:43–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41 return uniqElements;
42 },
43 _difference = function () {
44 arguments = arguments[0];
45 var firstArray = arguments[0], otherArrays = [], diffArray = [];
46 for (var i = 1, length = arguments.length; i < length; i++) {
47 otherArrays = otherArrays.concat(arguments[i]);
48 }
49
50 for (i = 0, length = firstArray.length; i < length; i++) {
51 if (!_contains(otherArrays, firstArray[i])) {
52 diffArray.push(firstArray[i]);
53 }
54 }
55
56 return diffArray;
57 },
58 _intersection = function () {
59 arguments = arguments[0];
60 var result = [], firstArray = arguments[0],

Callers 1

BasilSetFunction · 0.85

Calls 1

_containsFunction · 0.85

Tested by

no test coverage detected