Skip to content
napi-bindings

Search

Search pages, projects and the Node-API reference

Browse Node-APIshow

napi_get_instance_data

functionv6js_native_api.h

This API retrieves data that was previously associated with the currently running Node.js environment via napi_set_instance_data(). If no data is set, the call will succeed and data will be set to NULL.

napi_status napi_get_instance_data(node_api_basic_env env,
                                   void** data);
  • [in] env: The environment that the Node-API call is invoked under.
  • [out] data: The data item that was previously associated with the currently running Node.js environment by a call to napi_set_instance_data().

Returns napi_ok if the API succeeded.

This API retrieves data that was previously associated with the currently running Node.js environment via napi_set_instance_data(). If no data is set, the call will succeed and data will be set to NULL.

View in the official Node.js documentation