Asserts whether the provided array is a valid time array.
A valid time array is an array of four numbers, where the first two numbers represent hours and minutes, and the last two numbers represent seconds and milliseconds.
Throws an error if the array is not valid.
Parameters
array: number[]
The array to be validated.
Returns void
Throws
Will throw an error if the array length is not 4.
Example
assertValidTimeArray([12, 30, 45, 500]); // No error assertValidTimeArray([12, 30, 45]); // Throws Error: 'Expected array of length 4.'
Asserts whether the provided array is a valid time array. A valid time array is an array of four numbers, where the first two numbers represent hours and minutes, and the last two numbers represent seconds and milliseconds. Throws an error if the array is not valid.