docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
A small utility that converts individual domain labels between Unicode and their ASCII Punycode form while surfacing RangeError for malformed or unrepresentable inputs.
mañana converts to an ASCII Punycode label and decoding returns mañana @testxn--abc! raises a RangeError to indicate an invalid Punycode digit @testxn--9999999999 raises a RangeError caused by numeric overflow in the Punycode input @test/**
* Converts a single Unicode domain label to its ASCII Punycode representation.
* Must surface the dependency's RangeError when the label cannot be encoded safely.
*/
export function toAsciiLabel(unicodeLabel) {}
/**
* Converts a single ASCII Punycode label back to Unicode.
* Must surface the dependency's RangeError when the input contains invalid digits or overflows.
*/
export function toUnicodeLabel(asciiLabel) {}Use the official Punycode implementation for label conversions, relying on its RangeError signaling for invalid digits and overflow. @satisfied-by