Function assertValidTimeStringFormatting

  • Asserts that the provided string is a valid time string format. Throws an error if the string is not in the format hh:mm:ss[,|.]mmm.

    Parameters

    • string: string

      The string to be validated.

    Returns void

    Throws

    Will throw an error if the string is not in the correct format.

    Example

    assertValidTimeStringFormatting('12:34:56.789'); // No error thrown
    assertValidTimeStringFormatting('12:34:56,789'); // No error thrown
    assertValidTimeStringFormatting('12:34:56'); // Throws Error

Generated using TypeDoc