Skip to content

Commit 0c25aa8

Browse files
firedfoxMyles Borins
authored and
Myles Borins
committed
doc: add added: information for punycode
PR-URL: #6805 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 057492c commit 0c25aa8

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

doc/api/punycode.md

+25-1
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)