summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2017-06-27 13:29:58 -0400
committercjihrig <cjihrig@gmail.com>2017-06-30 17:08:51 -0400
commitf803e77b1e2347dbce9d8098f3b6e231f4ce5fcd (patch)
treef75980ab6073ce282168d359a9a0ec8fd0625cc7 /doc
parent9e5a2118cc15c63088837ce9424e844084d07633 (diff)
downloadnode-new-f803e77b1e2347dbce9d8098f3b6e231f4ce5fcd.tar.gz
n-api: add napi_delete_element()
Refs: https://github.com/nodejs/node/issues/13924 PR-URL: https://github.com/nodejs/node/pull/13949 Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/n-api.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/api/n-api.md b/doc/api/n-api.md
index 078d9642e2..052c6cbdb4 100644
--- a/doc/api/n-api.md
+++ b/doc/api/n-api.md
@@ -2400,6 +2400,27 @@ Returns `napi_ok` if the API succeeded.
This API returns if the Object passed in has an element at the
requested index.
+#### *napi_delete_element*
+<!-- YAML
+added: REPLACEME
+-->
+```C
+napi_status napi_delete_element(napi_env env,
+ napi_value object,
+ uint32_t index,
+ bool* result);
+```
+
+- `[in] env`: The environment that the N-API call is invoked under.
+- `[in] object`: The object to query.
+- `[in] index`: The index of the property to delete.
+- `[out] result`: Whether the element deletion succeeded or not. `result` can
+optionally be ignored by passing `NULL`.
+
+Returns `napi_ok` if the API succeeded.
+
+This API attempts to delete the specified `index` from `object`.
+
#### *napi_define_properties*
<!-- YAML
added: v8.0.0
@@ -3051,6 +3072,7 @@ support it:
[`napi_create_type_error`]: #n_api_napi_create_type_error
[`napi_delete_async_work`]: #n_api_napi_delete_async_work
[`napi_define_class`]: #n_api_napi_define_class
+[`napi_delete_element`]: #n_api_napi_delete_element
[`napi_delete_reference`]: #n_api_napi_delete_reference
[`napi_escape_handle`]: #n_api_napi_escape_handle
[`napi_get_array_length`]: #n_api_napi_get_array_length