From 60867fb030bae582082340ead7dbc7efdc2f5398 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Fri, 3 Apr 2020 02:37:42 -0700 Subject: 2020/04/03, 02:34, v1.2.0 --- node_modules/node-addon-api/doc/env.md | 63 ++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 node_modules/node-addon-api/doc/env.md (limited to 'node_modules/node-addon-api/doc/env.md') diff --git a/node_modules/node-addon-api/doc/env.md b/node_modules/node-addon-api/doc/env.md new file mode 100644 index 0000000..9bde741 --- /dev/null +++ b/node_modules/node-addon-api/doc/env.md @@ -0,0 +1,63 @@ +# Env + +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. + +## Methods + +### Constructor + +```cpp +Napi::Env::Env(napi_env env); +``` + +- `[in] env`: The `napi_env` environment from which to construct the `Napi::Env` object. + +### napi_env + +```cpp +operator napi_env() const; +``` + +Returns the `napi_env` opaque data structure representing the environment. + +### Global + +```cpp +Napi::Object Napi::Env::Global() const; +``` + +Returns the `Napi::Object` representing the environment's JavaScript Global Object. + +### Undefined + +```cpp +Napi::Value Napi::Env::Undefined() const; +``` + +Returns the `Napi::Value` representing the environment's JavaScript Undefined Object. + +### Null + +```cpp +Napi::Value Napi::Env::Null() const; +``` + +Returns the `Napi::Value` representing the environment's JavaScript Null Object. + +### IsExceptionPending + +```cpp +bool Napi::Env::IsExceptionPending() const; +``` + +Returns a `bool` indicating if an exception is pending in the environment. + +### GetAndClearPendingException + +```cpp +Napi::Error Napi::Env::GetAndClearPendingException(); +``` + +Returns an `Napi::Error` object representing the environment's pending exception, if any. -- cgit v1.2.3