Files
ospab.host/node_modules/fast-check/lib/arbitrary/_internals/helpers/InvalidSubdomainLabelFiIter.js
2025-09-15 18:10:26 +03:00

14 lines
455 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.filterInvalidSubdomainLabel = filterInvalidSubdomainLabel;
function filterInvalidSubdomainLabel(subdomainLabel) {
if (subdomainLabel.length > 63) {
return false;
}
return (subdomainLabel.length < 4 ||
subdomainLabel[0] !== 'x' ||
subdomainLabel[1] !== 'n' ||
subdomainLabel[2] !== '-' ||
subdomainLabel[3] !== '-');
}