docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a module that converts punycoded domain names and email addresses into their Unicode form while leaving non-punycoded parts untouched.
shop.xn--caf-dma.com becomes shop.café.com, and legacy dot separators (such as 。 or 。) are treated the same as . during conversion @testbücher.de or example.com) are returned unchanged, even when the conversion is applied repeatedly @testalice@xn--xmpl-loa.test becomes alice@exämple.test while preserving the local part exactly as provided @testxn--invalid_domain) results in a thrown RangeError @test/**
* Converts a domain name string to its Unicode form, normalizing legacy separators and decoding punycoded labels; throws RangeError for malformed punycode.
*/
export function toUnicodeDomain(input);
/**
* Converts only the domain portion of an email address to Unicode while leaving the local part unchanged; throws RangeError for malformed punycode labels.
*/
export function toUnicodeEmail(input);Provides Punycode-based domain and email conversions.