mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
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:
parent
716ee1531c
commit
2ff671e4c4
|
|
@ -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'));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user