napi_get_instance_data
functionv6js_native_api.hThis 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 tonapi_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.