Node.js v0.10.18 手册 & 文档
关于本文档#
The goal of this documentation is to comprehensively explain the Node.js API, both from a reference as well as a conceptual point of view. Each section describes a built-in module or high-level concept.
本文档的目标是从参考和概念的角度全面解释 Node.js 的 API,每章节描述一个内置模块或高级概念。
Where appropriate, property types, method arguments, and the arguments provided to event handlers are detailed in a list underneath the topic heading.
在某些情况下,属性类型、方法参数以及事件处理过程(handler)参数 会被列在主标题下的列表中。
Every .html
document has a corresponding .json
document presenting
the same information in a structured manner. This feature is
experimental, and added for the benefit of IDEs and other utilities that
wish to do programmatic things with the documentation.
每一个 .html
文件都对应一份内容相同的结构化 .json
文档。这个特性现在还是实验性质的,希望能够为一些需要对文档进行操作的IDE或者其他工具提供帮助。
Every .html
and .json
file is generated based on the corresponding
.markdown
file in the doc/api/
folder in node's source tree. The
documentation is generated using the tools/doc/generate.js
program.
The HTML template is located at doc/template.html
.
每个 .html
和 .json
文件都是基于源码的 doc/api/
目录下的 .markdown
文件生成的。本文档使用 tools/doc/generate.js
这个程序来生产的。 HTML 模板文件为 doc/template.html
。
稳定度#
Throughout the documentation, you will see indications of a section's stability. The Node.js API is still somewhat changing, and as it matures, certain parts are more reliable than others. Some 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 and in the process of being redesigned.
在文档中,您可以了解每一个小节的稳定性。Node.js的API会有一些小的改变,当它成熟的时候,会有些部分相比另外一些来说更加可靠。有一部分接受过严格验证,被大量依赖的API几乎是不会改变的。也有一些是新增的、实验性的或者因被证实具有危险性而在重新设计中。
The stability indices are as follows:
稳定度定义如下
稳定度: 5 - 已锁定
除非发现严重缺陷,该代码不会被更改。请不要对此区域提出更改,更改提议将被拒绝。
JSON 输出#
稳定度: 1 - 实验性
Every HTML file in the markdown has a corresponding JSON file with the same data.
每个通过 markdown 生成的 HTML 文件都对应于一个具有相同数据的 JSON 文件。
This feature is new as of node v0.6.12. It is experimental.
该特性引入于 node v0.6.12。当前是测试性功能。