使用 JavaScript 值和抽象操作


¥Working with JavaScript values and abstract operations

Node-API 公开了一组 API 来对 JavaScript 值执行一些抽象操作。其中一些操作记录在 ECMAScript 语言规范第 7 节 下。

¥Node-API exposes a set of APIs to perform some abstract operations on JavaScript values. Some of these operations are documented under Section 7 of the ECMAScript Language Specification.

这些 API 支持执行以下操作之一:

¥These APIs support doing one of the following:

  1. 将 JavaScript 值强制转换为特定的 JavaScript 类型(例如 numberstring)。

    ¥Coerce JavaScript values to specific JavaScript types (such as number or string).

  2. 检查 JavaScript 值的类型。

    ¥Check the type of a JavaScript value.

  3. 检查两个 JavaScript 值之间的相等性。

    ¥Check for equality between two JavaScript values.