UNPKG

typia

Version:

Superfast runtime validators with only one line

5 lines (3 loc) 194 B
export const _isFormatTime = (str: string): boolean => PATTERN.test(str); const PATTERN = /^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i;