Skip to main content

punycode

Return the Punycode of the given domain if it's non-ASCII.

def punycode(
domain: string
) - > string

Return the Punycode of the given domain if it's non-ASCII.

Parameters

NameTypeDescription
domainstringThe domain name string to be encoded into Punycode

Returns

TypeDescription
stringThe ASCII-compatible Punycode representation of the domain name