(array, element)
| 195 | } |
| 196 | |
| 197 | export function removeElement(array, element) { |
| 198 | var index = array.indexOf(element); |
| 199 | if (index >= 0) { |
| 200 | array.splice(index, 1); |
| 201 | } |
| 202 | |
| 203 | return array; |
| 204 | } |
| 205 | |
| 206 | // removes elements from the array, for which predicate is true |
| 207 | export function removeElementIf(array, predicate) { |
no outgoing calls
no test coverage detected