$.array.destroy
Destroy method of array helpers
Delete the first or the last element of array
// delete the first
const fromArray = ['a', 'b', 'c', 'd', 'e', 'f']
$.array.destroy(fromArray, 'first')
//=> ['b', 'c', 'd', 'e', 'f']
// or
// delete the last
$.array.destroy(fromArray, 'last')
//=> ['a', 'b', 'c', 'd', 'e']Delete by indexes
$.array.destroy(fromArray, 0, 2, 3, 5)
//=> ['b', 'e']Delete by objects
$.array.destroy(fromArray, {id: 6}, {id: 9})
//or
$.array.destroy(fromArray, {id: 6}, 'first', 'last', 2)Last updated