A small function that removes one or more items from an array based upon a predicate function
npm install predicate-remove
npm install predicate-remove
`
$3
Without monkey patching:
`javascript
const remove = require ('predicate-remove').remove;
const array = [{id: 1} ,{id: 2}, {id: 3}];
//Remove item with id==1
remove (array,e=>e.id==1);
//Remove all items with id==2
remove (array,e=>e.id=2,true);
`
With monkey patching:
`javascript
require ('predicate-remove').monkeyPatch();
const array = [{id: 1} ,{id: 2}, {id: 3}];
//Remove item with id==1
array.remove (e=>e.id==1);
//Remove all items with id==2
array.remove (e=>e.id=2,true);
``