UNPKG

typia

Version:

Superfast runtime validators with only one line

5 lines (3 loc) 161 B
export const _isFormatByte = (str: string): boolean => PATTERN.test(str); const PATTERN = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;