typia
Version:
Superfast runtime validators with only one line
6 lines (4 loc) • 338 B
JavaScript
const _isFormatUriTemplate = (str) => PATTERN.test(str);
const PATTERN = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
export { _isFormatUriTemplate };
//# sourceMappingURL=_isFormatUriTemplate.mjs.map