napi_is_arraybuffer


napi_status napi_is_arraybuffer(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:给定对象是否为 ArrayBuffer

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

如果 API 成功,则返回 napi_ok

¥Returns napi_ok if the API succeeded.

该 API 检查传入的 Object 是否为数组缓冲区。

¥This API checks if the Object passed in is an array buffer.