1. napi_status napi_get_value_external(napi_env env,
    2. napi_value value,
    3. void** result)
    • [in] env: The environment that the API is invoked under.
    • [in] value: napi_value representing JavaScript external value.
    • [out] result: Pointer to the data wrapped by the JavaScript external value.

    Returns napi_ok if the API succeeded. If a non-external napi_value is passed in it returns napi_invalid_arg.

    This API retrieves the external data pointer that was previously passed to napi_create_external().