src/util.js
function remove(array, fn) {
  const idx = array.findIndex(fn)
  if (idx !== -1) {
    array.splice(idx, 1)
  }
}
function remove(array, fn) {
  const idx = array.findIndex(fn)
  if (idx !== -1) {
    array.splice(idx, 1)
  }
}
function remove ( array , fn ) { const idx = array . findIndex ( fn ) if ( idx !== - 1 ) { array . splice ( idx , 1 ) } }
Remove one copy of a matched item from an array given a predicate function
Remove one copy of a matched item from an array given a predicate function