properly drop mutually-referring declarations that are not otherwise
referenced and have no side effects
This commit is contained in:
12
lib/utils.js
12
lib/utils.js
@@ -190,3 +190,15 @@ function mergeSort(array, cmp) {
|
||||
};
|
||||
return _ms(array);
|
||||
};
|
||||
|
||||
function set_difference(a, b) {
|
||||
return a.filter(function(el){
|
||||
return b.indexOf(el) < 0;
|
||||
});
|
||||
};
|
||||
|
||||
function set_intersection(a, b) {
|
||||
return a.filter(function(el){
|
||||
return b.indexOf(el) >= 0;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user