Skip to content
napi-bindings

Search

Search pages, projects and the Node-API reference

Browse Node-APIshow

napi_create_object

functionv1js_native_api.h

This API allocates a default JavaScript Object. It is the equivalent of doing new Object() in JavaScript.

napi_status napi_create_object(napi_env env, napi_value* result)
  • [in] env: The environment that the API is invoked under.
  • [out] result: A napi_value representing a JavaScript Object.

Returns napi_ok if the API succeeded.

This API allocates a default JavaScript Object. It is the equivalent of doing new Object() in JavaScript.

The JavaScript Object type is described in Section object type of the ECMAScript Language Specification.

View in the official Node.js documentation