source: frontend/node_modules/underscore/cjs/difference.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 515 bytes
Line 
1var restArguments = require('./restArguments.js');
2var _flatten = require('./_flatten.js');
3var filter = require('./filter.js');
4var contains = require('./contains.js');
5
6// Take the difference between one array and a number of other arrays.
7// Only the elements present in just the first array will remain.
8var difference = restArguments(function(array, rest) {
9 rest = _flatten(rest, true, true);
10 return filter(array, function(value){
11 return !contains(rest, value);
12 });
13});
14
15module.exports = difference;
Note: See TracBrowser for help on using the repository browser.