稳定性指数
在文档中都有章节稳定性的标志。 有些 API 已被证明和依赖,因此它们几乎不可能改变。 有些则是全新的和实验的、或者已知是危险的。
稳定性指数如下:
如果特性的使用没有害处并且其在 npm 生态系统中被广泛依赖,则标记为旧版而不是弃用。 旧版特性中发现的缺陷不太可能被修复。
当使用实验的特性时要小心,尤其是在模块中。 用户可能不知道正在使用实验的特性。 当实验的 API 发生修改时,故障或行为的变化可能会让用户感到诧异。 为避免诧异,使用实验的特性可能需要命令行标志。 实验的特性也可能触发警告。
Throughout the documentation are indications of a section's stability. Some APIs are so proven and so relied upon that they are unlikely to ever change at all. Others are brand new and experimental, or known to be hazardous.
The stability indices are as follows:
Features are marked as legacy rather than being deprecated if their use does no harm, and they are widely relied upon within the npm ecosystem. Bugs found in legacy features are unlikely to be fixed.
Use caution when making use of Experimental features, particularly within modules. Users may not be aware that experimental features are being used. Bugs or behavior changes may surprise users when Experimental API modifications occur. To avoid surprises, use of an Experimental feature may need a command-line flag. Experimental features may also emit a warning.