cpt-waffle-lotide
Version:
LoTide in Typescript
18 lines (17 loc) • 423 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const without = (source, itemsToRemove) => {
;
const obj = {};
itemsToRemove.forEach((item) => {
obj[item] = item;
});
const result = [];
source.forEach((item) => {
if (obj[item] && obj[item] === item)
return;
result.push(item);
});
return result;
};
exports.default = without;