Maybe Types
The Nan::MaybeLocal
and Nan::Maybe
types are monads that encapsulate v8::Local
handles that may be empty.
Maybe Helpers
Nan::MaybeLocal
A Nan::MaybeLocal<T>
is a wrapper around v8::Local<T>
that enforces a check that determines whether the v8::Local<T>
is empty before it can be used.
If an API method returns a Nan::MaybeLocal
, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a v8::TerminateExecution
exception was thrown. In that case, an empty Nan::MaybeLocal
is returned.
Definition:
See the documentation for v8::MaybeLocal
for further details.
Nan::Maybe
A simple Nan::Maybe
type, representing an object which may or may not have a value, see https://hackage.haskell.org/package/base/docs/Data-Maybe.html.
If an API method returns a Nan::Maybe<>
, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a v8::TerminateExecution
exception was thrown. In that case, a "Nothing" value is returned.
Definition:
See the documentation for v8::Maybe
for further details.
Nan::Nothing
Construct an empty Nan::Maybe
type representing nothing.
Nan::Just
Construct a Nan::Maybe
type representing just a value.
Nan::Call()
A helper method for calling v8::Function#Call()
in a way compatible across supported versions of V8.
Signature:
Nan::ToDetailString()
A helper method for calling v8::Value#ToDetailString()
in a way compatible across supported versions of V8.
Signature:
Nan::ToArrayIndex()
A helper method for calling v8::Value#ToArrayIndex()
in a way compatible across supported versions of V8.
Signature:
Nan::Equals()
A helper method for calling v8::Value#Equals()
in a way compatible across supported versions of V8.
Signature:
Nan::NewInstance()
A helper method for calling v8::Function#NewInstance()
and v8::ObjectTemplate#NewInstance()
in a way compatible across supported versions of V8.
Signature:
Nan::GetFunction()
A helper method for calling v8::FunctionTemplate#GetFunction()
in a way compatible across supported versions of V8.
Signature:
Nan::Set()
A helper method for calling v8::Object#Set()
in a way compatible across supported versions of V8.
Signature:
Nan::ForceSet()
A helper method for calling v8::Object#ForceSet()
in a way compatible across supported versions of V8.
Signature:
Nan::Get()
A helper method for calling v8::Object#Get()
in a way compatible across supported versions of V8.
Signature:
Nan::GetPropertyAttributes()
A helper method for calling v8::Object#GetPropertyAttributes()
in a way compatible across supported versions of V8.
Signature:
Nan::Has()
A helper method for calling v8::Object#Has()
in a way compatible across supported versions of V8.
Signature:
Nan::Delete()
A helper method for calling v8::Object#Delete()
in a way compatible across supported versions of V8.
Signature:
Nan::GetPropertyNames()
A helper method for calling v8::Object#GetPropertyNames()
in a way compatible across supported versions of V8.
Signature:
Nan::GetOwnPropertyNames()
A helper method for calling v8::Object#GetOwnPropertyNames()
in a way compatible across supported versions of V8.
Signature:
Nan::SetPrototype()
A helper method for calling v8::Object#SetPrototype()
in a way compatible across supported versions of V8.
Signature:
Nan::ObjectProtoToString()
A helper method for calling v8::Object#ObjectProtoToString()
in a way compatible across supported versions of V8.
Signature:
Nan::HasOwnProperty()
A helper method for calling v8::Object#HasOwnProperty()
in a way compatible across supported versions of V8.
Signature:
Nan::HasRealNamedProperty()
A helper method for calling v8::Object#HasRealNamedProperty()
in a way compatible across supported versions of V8.
Signature:
Nan::HasRealIndexedProperty()
A helper method for calling v8::Object#HasRealIndexedProperty()
in a way compatible across supported versions of V8.
Signature:
Nan::HasRealNamedCallbackProperty()
A helper method for calling v8::Object#HasRealNamedCallbackProperty()
in a way compatible across supported versions of V8.
Signature:
Nan::GetRealNamedPropertyInPrototypeChain()
A helper method for calling v8::Object#GetRealNamedPropertyInPrototypeChain()
in a way compatible across supported versions of V8.
Signature:
Nan::GetRealNamedProperty()
A helper method for calling v8::Object#GetRealNamedProperty()
in a way compatible across supported versions of V8.
Signature:
Nan::CallAsFunction()
A helper method for calling v8::Object#CallAsFunction()
in a way compatible across supported versions of V8.
Signature:
Nan::CallAsConstructor()
A helper method for calling v8::Object#CallAsConstructor()
in a way compatible across supported versions of V8.
Signature:
Nan::GetSourceLine()
A helper method for calling v8::Message#GetSourceLine()
in a way compatible across supported versions of V8.
Signature:
Nan::GetLineNumber()
A helper method for calling v8::Message#GetLineNumber()
in a way compatible across supported versions of V8.
Signature:
Nan::GetStartColumn()
A helper method for calling v8::Message#GetStartColumn()
in a way compatible across supported versions of V8.
Signature:
Nan::GetEndColumn()
A helper method for calling v8::Message#GetEndColumn()
in a way compatible across supported versions of V8.
Signature:
Nan::CloneElementAt()
A helper method for calling v8::Array#CloneElementAt()
in a way compatible across supported versions of V8.
Signature:
Nan::MakeMaybe()
Wraps a v8::Local<>
in a Nan::MaybeLocal<>
. When called with a Nan::MaybeLocal<>
it just returns its argument. This is useful in generic template code that builds on NAN.
Synopsis:
Signature:
Last updated