(arr, item, add, byValueOnly)
| 7 | } |
| 8 | |
| 9 | export function splice(arr, item, add, byValueOnly) { |
| 10 | let i = arr ? findWhere(arr, item, true, byValueOnly) : -1; |
| 11 | if (~i) add ? arr.splice(i, 0, add) : arr.splice(i, 1); |
| 12 | return i; |
| 13 | } |
| 14 | |
| 15 | export function findWhere(arr, fn, returnIndex, byValueOnly) { |
| 16 | let i = arr.length; |
no test coverage detected
searching dependent graphs…