Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function domainToASCII(domain, beStrict = false) {
const result = tr46.toASCII(domain, {
checkBidi: true,
checkHyphens: false,
checkJoiners: true,
useSTD3ASCIIRules: beStrict,
verifyDNSLength: beStrict
});
if (result === null) {
return failure;
}
return result;
}
function domainToASCII(domain, beStrict = false) {
const result = tr46.toASCII(domain, {
checkBidi: true,
checkHyphens: false,
checkJoiners: true,
useSTD3ASCIIRules: beStrict,
verifyDNSLength: beStrict
});
if (result === null) {
return failure;
}
return result;
}
function domainToASCII(domain, beStrict = false) {
const result = tr46.toASCII(domain, {
checkBidi: true,
checkHyphens: false,
checkJoiners: true,
useSTD3ASCIIRules: beStrict,
verifyDNSLength: beStrict
});
if (result === null) {
return failure;
}
return result;
}
function domainToASCII(domain, beStrict = false) {
const result = tr46.toASCII(domain, {
checkBidi: true,
checkHyphens: false,
checkJoiners: true,
useSTD3ASCIIRules: beStrict,
verifyDNSLength: beStrict
});
if (result === null) {
return failure;
}
return result;
}