remove-and-do

Remove an item from a collection in context and run an action on removed item

Usage no npm install needed!

<script type="module">
  import removeAndDo from 'https://cdn.skypack.dev/remove-and-do';
</script>

README

remove-and-do

Remove an item from a collection in context and run an action on removed item

Installation

$ npm install --save remove-and-do

Usage

var removeAndDo = require('remove-and-do');

removeAndDo(this, collection, thing, action);
// -> true if removed, false otherwise

License

MIT ©Gilad Peleg