UNPKG

typia

Version:

Superfast runtime validators with only one line

7 lines (6 loc) 278 B
//#region src/internal/_isFormatDuration.ts const _isFormatDuration = (str) => PATTERN.test(str); const PATTERN = /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/; //#endregion export { _isFormatDuration }; //# sourceMappingURL=_isFormatDuration.mjs.map