Skip to content

Commit

Permalink
doc: sort punycode alphabetically
Browse files Browse the repository at this point in the history
Reorders, with no contextual changes, the punycode documentation
alphabetically.

PR-URL: #3662
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
  • Loading branch information
tflanagan authored and rvagg committed Nov 13, 2015
1 parent bc63667 commit 1f56aba
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions doc/api/punycode.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ Converts a string of Unicode symbols to a Punycode string of ASCII-only symbols.
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
Expand All @@ -42,6 +32,16 @@ you call it with a domain that's already in ASCII.
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)
Expand Down

0 comments on commit 1f56aba

Please sign in to comment.