Skip to content

Commit adcf5a9

Browse files
fix(docs): fix documentation
1 parent e24db25 commit adcf5a9

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

README.md

+19-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ the full mapping for these strings, as defined by
3232

3333
### NodeJS Version Compatibility
3434

35-
| Version | NodeJS |
36-
| ------- | ------ |
37-
| any | >= 4.x |
35+
| Version | NodeJS |
36+
| -------- | ------ |
37+
| >= 3.1.0 | >= 6.x |
38+
| <= 3.0.0 | >= 4.x |
3839

3940
### Installation / Update
4041

@@ -110,6 +111,21 @@ uts46.toUnicode('﷼') // "ریال"
110111
uts46.toUnicode(String.fromCodePoint(0xd0000)) // Error (as it is unassigned)
111112
```
112113

114+
##### `uts46.convert(domain)`
115+
116+
Converts a domain name in correct way. Returning IDNA2003 / IDNA2008 strings
117+
where it makes sense as this is dependent on the domain extension / TLD.
118+
119+
```js
120+
/* eslint-disable */
121+
uts46.convert('xn-bb-eka.at') // { IDN: 'öbb.at', PC: 'xn-bb-eka.at' }
122+
uts46.convert(['öbb.at', 'xn--fa-hia.de']) // { IDN: ['öbb.at', 'faß.de'], PC: ['xn-bb-eka.at', 'faß.de'] }
123+
```
124+
125+
#### Using it in-browser
126+
127+
Use file `uts46bundle.js` as JavaScript include. The Tool will then be available as ispapiIdnconverter object in Javascript.
128+
113129
### Known issues
114130

115131
It also does not try to implement the Bidi and contextual rules for validation:

0 commit comments

Comments
 (0)