## Nan::Callback
`Nan::Callback` makes it easier to use `v8::Function` handles as callbacks. A class that wraps a `v8::Function` handle, protecting it from garbage collection and making it particularly useful for storage and use across asynchronous execution.
“`c++
class Callback {
public:
Callback();
explicit Callback(const v8::Local
~Callback();
bool operator==(const Callback &other) const;
bool operator!=(const Callback &other) const;
v8::Local
v8::Local
int argc = 0,
v8::Local
v8::Local
v8::Local
void SetFunction(const v8::Local
v8::Local
bool IsEmpty() const;
void Reset(const v8::Local
void Reset();
v8::Local
int argc,
v8::Local
v8::Local
};
“`
Example usage:
“`c++
v8::Local
Nan::Callback callback(function);
callback.Call(0, 0);
“`