napi_delete_element
napi_status napi_delete_element(napi_env env,
napi_value object,
uint32_t index,
bool* result);
-
[in] env
:调用 Node-API 调用的环境。¥
[in] env
: The environment that the Node-API call is invoked under. -
[in] object
:要查询的对象。¥
[in] object
: The object to query. -
[in] index
:要删除的属性的索引。¥
[in] index
: The index of the property to delete. -
[out] result
:删除元素是否成功。result
可以选择性地通过传递NULL
来忽略。¥
[out] result
: Whether the element deletion succeeded or not.result
can optionally be ignored by passingNULL
.
如果 API 成功,则返回 napi_ok
。
¥Returns napi_ok
if the API succeeded.
此 API 尝试从 object
中删除指定的 index
。
¥This API attempts to delete the specified index
from object
.