punycode.encode('mañana'); // 'maana-pta'
punycode.encode('☃-⌘'); // '--dqo34k'
-## punycode.toUnicode(domain)
-
-Converts a Punycode string representing a domain name to Unicode. Only the
-Punycoded parts of the domain name will be converted, i.e. it doesn't matter if
-you call it on a string that has already been converted to Unicode.
-
- // decode domain names
- punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
- punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com'
-
## punycode.toASCII(domain)
Converts a Unicode string representing a domain name to Punycode. Only the
punycode.toASCII('mañana.com'); // 'xn--maana-pta.com'
punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com'
+## punycode.toUnicode(domain)
+
+Converts a Punycode string representing a domain name to Unicode. Only the
+Punycoded parts of the domain name will be converted, i.e. it doesn't matter if
+you call it on a string that has already been converted to Unicode.
+
+ // decode domain names
+ punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
+ punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com'
+
## punycode.ucs2
### punycode.ucs2.decode(string)