1.5 KiB
1.5 KiB
Boolean
Napi::Boolean
class is a representation of the
JavaScript Boolean
object. The Napi::Boolean
class inherits its behavior from the Napi::Value
class (for
more info see: Napi::Value
).
Methods
Constructor
Creates a new empty instance of an Napi::Boolean
object.
::Boolean::Boolean(); Napi
Returns a new empty Napi::Boolean
object.
Contructor
Creates a new instance of the Napi::Boolean
object.
::Boolean(napi_env env, napi_value value); Napi
[in] env
: Thenapi_env
environment in which to construct theNapi::Boolean
object.[in] value
: Thenapi_value
which is a handle for a JavaScriptBoolean
.
Returns a non-empty Napi::Boolean
object.
New
Initializes a new instance of the Napi::Boolean
object.
::Boolean Napi::Boolean::New(napi_env env, bool value); Napi
[in] env
: Thenapi_env
environment in which to construct theNapi::Boolean
object.[in] value
: The primitive boolean value (true
orfalse
).
Returns a new instance of the Napi::Boolean
object.
Value
Converts a Napi::Boolean
value to a boolean
primitive.
bool Napi::Boolean::Value() const;
Returns the boolean primitive type of the corresponding
Napi::Boolean
object.
Operators
operator bool
Converts a Napi::Boolean
value to a boolean
primitive.
::Boolean::operator bool() const; Napi
Returns the boolean primitive type of the corresponding
Napi::Boolean
object.