(indices: number[], arrLength: number)
| 60 | * @internal please do not use. |
| 61 | */ |
| 62 | export function sanitizeIndices(indices: number[], arrLength: number): number[] { |
| 63 | const sanitizedIndices = []; |
| 64 | |
| 65 | indices.forEach(index => { |
| 66 | index = normalizeIndex(index, arrLength); |
| 67 | |
| 68 | if (index < arrLength && isValidIndex(index)) { |
| 69 | sanitizedIndices.push(index); |
| 70 | } |
| 71 | }); |
| 72 | |
| 73 | return deDuplicate(sanitizedIndices); |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * @internal please do not use. |
no test coverage detected