typia
Version:
Superfast runtime validators with only one line
7 lines (6 loc) • 304 B
JavaScript
//#region src/internal/_isFormatIdnHostname.ts
const _isFormatIdnHostname = (str) => PATTERN.test(str);
const PATTERN = /^([a-z0-9\u00a1-\uffff0-9]+(-[a-z0-9\u00a1-\uffff0-9]+)*\.)+[a-z\u00a1-\uffff]{2,}$/i;
//#endregion
export { _isFormatIdnHostname };
//# sourceMappingURL=_isFormatIdnHostname.mjs.map