构建 Node.js 的选项
🌐 Options for building Node.js
要控制 Node.js 中 ICU 的使用,在编译过程中可以使用四个 configure 选项。有关如何编译 Node.js 的更多详细信息,请参见 BUILDING.md。
🌐 To control how ICU is used in Node.js, four configure options are available
during compilation. Additional details on how to compile Node.js are documented
in BUILDING.md.
--with-intl=none/--without-intl--with-intl=system-icu--with-intl=small-icu--with-intl=full-icu(默认)
每个 configure 选项可用的 Node.js 和 JavaScript 功能概览:
🌐 An overview of available Node.js and JavaScript features for each configure
option:
| 功能 | none | system-icu | small-icu | full-icu |
| --- | --- | --- | --- | --- |
| String.prototype.normalize() | 无(功能为空操作) | 完整 | 完整 | 完整 |
| String.prototype.to*Case() | 全部 | 全部 | 全部 | 全部 |
| Intl | 无(对象不存在) | 部分/全部(取决于操作系统) | 部分(仅限英文) | 全部 |
| String.prototype.localeCompare() | 部分(不支持本地化) | 完整 | 完整 | 完整 |
| String.prototype.toLocale*Case() | 部分(不支持本地化) | 完整 | 完整 | 完整 |
| Number.prototype.toLocaleString() | 部分(不支持区域设置) | 部分/完整(取决于操作系统) | 部分(仅限英语) | 完整 |
| Date.prototype.toLocale*String() | 部分(不支持区域设置) | 部分/完整(取决于操作系统) | 部分(仅限英语) | 完整 |
| 旧版 URL 解析器 | 部分(不支持 IDN) | 完整 | 完整 | 完整 |
| WHATWG URL 解析器 | 部分(不支持国际化域名) | 完整 | 完整 | 完整 |
| require('node:buffer').transcode() | 无(功能不存在) | 全部 | 全部 | 全部 |
| REPL | 部分(不准确的线路编辑) | 完整 | 完整 | 完整 |
| require('node:util').TextDecoder | 部分(支持基本编码) | 部分/完全(取决于操作系统) | 部分(仅限 Unicode) | 完全 |
| RegExp Unicode 属性转义 | 无(无效的 RegExp 错误) | 完整 | 完整 | 完整 |
“(非地区感知)”的标记表示该函数的操作方式与非 Locale 版本的函数相同(如果存在的话)。例如,在 none 模式下,Date.prototype.toLocaleString() 的操作与 Date.prototype.toString() 的操作完全相同。
🌐 The "(not locale-aware)" designation denotes that the function carries out its
operation just like the non-Locale version of the function, if one
exists. For example, under none mode, Date.prototype.toLocaleString()'s
operation is identical to that of Date.prototype.toString().