Skip to content

Commit

Permalink
doc,url: clarify domainTo* when built without ICU
Browse files Browse the repository at this point in the history
Continuation of: #35099

Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: #38789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
RaisinTen authored and richardlau committed Jul 22, 2021
1 parent f07e576 commit 64140af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,9 @@ invalid domain, the empty string is returned.

It performs the inverse operation to [`url.domainToUnicode()`][].

This feature is only available if the `node` executable was compiled with
[ICU][] enabled. If not, the domain names are passed through unchanged.

```js
const url = require('url');
console.log(url.domainToASCII('español.com'));
Expand All @@ -938,6 +941,9 @@ domain, the empty string is returned.

It performs the inverse operation to [`url.domainToASCII()`][].

This feature is only available if the `node` executable was compiled with
[ICU][] enabled. If not, the domain names are passed through unchanged.

```js
const url = require('url');
console.log(url.domainToUnicode('xn--espaol-zwa.com'));
Expand Down

0 comments on commit 64140af

Please sign in to comment.