devsite/node_modules/array-differ/index.js

9 lines
191 B
JavaScript
Raw Normal View History

2024-07-08 01:49:38 +00:00
'use strict';
const arrayDiffer = (array, ...values) => {
const rest = new Set([].concat(...values));
return array.filter(element => !rest.has(element));
};
module.exports = arrayDiffer;