WORK IN PROGRESS, NOT YET COMPLETE
The opaque data structure containing the environment in which the request is being run.
The Env object is usually created and passed by the Node.js runtime or node-addon-api infrastructure.
Env(napi_env env);
[in] env
: Thenapi_env
environment from which to construct theEnv
object.
operator napi_env() const;
Returns the napi_env
opaque data structure representing the environment.
Object Global() const;
Returns the Object
representing the environment's JavaScript Global Object.
Value Undefined() const;
Returns the Value
representing the environment's JavaScript Undefined Object.
Value Null() const;
Returns the Value
representing the environment's JavaScript Null Object.
bool IsExceptionPending() const;
Returns a bool
indicating if an exception is pending in the environment.
Error GetAndClearPendingException();
Returns an Error
object representing the environment's pending exception, if any.