napi_is_array


napi_status napi_is_array(napi_env env, napi_value value, bool* result) 
  • [in] env:调用 API 的环境。

    ¥[in] env: The environment that the API is invoked under.

  • [in] value:要检查的 JavaScript 值。

    ¥[in] value: The JavaScript value to check.

  • [out] result:给定对象是否为数组。

    ¥[out] result: Whether the given object is an array.

如果 API 成功,则返回 napi_ok

¥Returns napi_ok if the API succeeded.

该 API 表示调用对象上的 IsArray 操作,如 ECMAScript 语言规范的 第 7.2.2 节 中所定义。

¥This API represents invoking the IsArray operation on the object as defined in Section 7.2.2 of the ECMAScript Language Specification.