Skip to content

Commit

Permalink
fix(docs): fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiSchwarz-cnic committed May 13, 2019
1 parent e24db25 commit adcf5a9
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ the full mapping for these strings, as defined by

### NodeJS Version Compatibility

| Version | NodeJS |
| ------- | ------ |
| any | >= 4.x |
| Version | NodeJS |
| -------- | ------ |
| >= 3.1.0 | >= 6.x |
| <= 3.0.0 | >= 4.x |

### Installation / Update

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

##### `uts46.convert(domain)`

Converts a domain name in correct way. Returning IDNA2003 / IDNA2008 strings
where it makes sense as this is dependent on the domain extension / TLD.

```js
/* eslint-disable */
uts46.convert('xn-bb-eka.at') // { IDN: 'öbb.at', PC: 'xn-bb-eka.at' }
uts46.convert(['öbb.at', 'xn--fa-hia.de']) // { IDN: ['öbb.at', 'faß.de'], PC: ['xn-bb-eka.at', 'faß.de'] }
```

#### Using it in-browser

Use file `uts46bundle.js` as JavaScript include. The Tool will then be available as ispapiIdnconverter object in Javascript.

### Known issues

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

0 comments on commit adcf5a9

Please sign in to comment.