(array: any[], index: number, count: number)
| 85 | * @param count Number of items to remove. |
| 86 | */ |
| 87 | export function arraySplice(array: any[], index: number, count: number): void { |
| 88 | const length = array.length - count; |
| 89 | while (index < length) { |
| 90 | array[index] = array[index + count]; |
| 91 | index++; |
| 92 | } |
| 93 | while (count--) { |
| 94 | array.pop(); // shrink the array |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * Same as `Array.splice(index, 0, value)` but faster. |
no test coverage detected
searching dependent graphs…