12 lines
341 B
JavaScript
Executable File
12 lines
341 B
JavaScript
Executable File
module.exports = function uniqueExcept (exclude) {
|
|
return function unique () {
|
|
var list = Array.prototype.concat.apply([], arguments);
|
|
return list.filter(function (item, i) {
|
|
if (item === exclude) {
|
|
return true;
|
|
}
|
|
return i === list.indexOf(item);
|
|
});
|
|
};
|
|
};
|