Tests if the start and end indexes are a safe range for the given array.
name | type | arguments | Default | description |
---|---|---|---|---|
array | array |
The array to check. |
||
startIndex | number |
The start index. |
||
endIndex | number |
The end index. |
||
throwError | boolean | <optional> | true |
Throw an error if the range is out of bounds. |
True if the range is safe, otherwise false.