doc,url: clarify domainTo* when built without ICU

Continuation of: https://github.com/nodejs/node/pull/35099

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

PR-URL: https://github.com/nodejs/node/pull/38789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Darshan Sen 2021-05-23 21:09:33 +05:30 committed by Richard Lau
parent 716ee1531c
commit 2ff671e4c4
No known key found for this signature in database
GPG Key ID: C43CEC45C17AB93C

View File

@ -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'));
@ -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'));