Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a870cdc

Browse filesBrowse files
firedfoxMyles Borins
authored andcommitted
doc: add added: information for punycode
PR-URL: #6805 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent f1a37ad commit a870cdc
Copy full SHA for a870cdc

File tree

Expand file treeCollapse file tree

1 file changed

+25
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+25
-1
lines changed
Open diff view settings
Collapse file

β€Ždoc/api/punycode.mdβ€Ž

Copy file name to clipboardExpand all lines: doc/api/punycode.md
+25-1Lines changed: 25 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
Stability: 2 - Stable
44

5-
[Punycode.js][] is bundled with Node.js v0.6.2+. Use `require('punycode')` to
5+
[Punycode.js][] is bundled with Node.js v0.5.1+. Use `require('punycode')` to
66
access it. (To use it with other Node.js versions, use npm to install the
77
`punycode` module first.)
88

99
## punycode.decode(string)
10+
<!-- YAML
11+
added: v0.5.1
12+
-->
1013

1114
Converts a Punycode string of ASCII-only symbols to a string of Unicode symbols.
1215

@@ -17,6 +20,9 @@ punycode.decode('--dqo34k'); // 'β˜ƒ-⌘'
1720
```
1821

1922
## punycode.encode(string)
23+
<!-- YAML
24+
added: v0.5.1
25+
-->
2026

2127
Converts a string of Unicode symbols to a Punycode string of ASCII-only symbols.
2228

@@ -27,6 +33,9 @@ punycode.encode('β˜ƒ-⌘'); // '--dqo34k'
2733
```
2834

2935
## punycode.toASCII(domain)
36+
<!-- YAML
37+
added: v0.6.1
38+
-->
3039

3140
Converts a Unicode string representing a domain name to Punycode. Only the
3241
non-ASCII parts of the domain name will be converted, i.e. it doesn't matter if
@@ -39,6 +48,9 @@ punycode.toASCII('β˜ƒ-⌘.com'); // 'xn----dqo34k.com'
3948
```
4049

4150
## punycode.toUnicode(domain)
51+
<!-- YAML
52+
added: v0.6.1
53+
-->
4254

4355
Converts a Punycode string representing a domain name to Unicode. Only the
4456
Punycoded parts of the domain name will be converted, i.e. it doesn't matter if
@@ -51,8 +63,14 @@ punycode.toUnicode('xn----dqo34k.com'); // 'β˜ƒ-⌘.com'
5163
```
5264

5365
## punycode.ucs2
66+
<!-- YAML
67+
added: v0.7.0
68+
-->
5469

5570
### punycode.ucs2.decode(string)
71+
<!-- YAML
72+
added: v0.7.0
73+
-->
5674

5775
Creates an array containing the numeric code point values of each Unicode
5876
symbol in the string. While [JavaScript uses UCS-2 internally][], this function
@@ -66,6 +84,9 @@ punycode.ucs2.decode('\uD834\uDF06'); // [0x1D306]
6684
```
6785

6886
### punycode.ucs2.encode(codePoints)
87+
<!-- YAML
88+
added: v0.7.0
89+
-->
6990

7091
Creates a string based on an array of numeric code point values.
7192

@@ -75,6 +96,9 @@ punycode.ucs2.encode([0x1D306]); // '\uD834\uDF06'
7596
```
7697

7798
## punycode.version
99+
<!-- YAML
100+
added: v0.6.1
101+
-->
78102

79103
A string representing the current Punycode.js version number.
80104

0 commit comments

Comments
0Β (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.