MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / EmptyConstructor

Function EmptyConstructor

test/function.cc:11–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9int testData = 1;
10
11Boolean EmptyConstructor(const CallbackInfo& info) {
12 auto env = info.Env();
13 bool isEmpty = info[0].As<Boolean>();
14 Function function = isEmpty ? Function() : Function(env, Object::New(env));
15 return Boolean::New(env, function.IsEmpty());
16}
17
18void VoidCallback(const CallbackInfo& info) {
19 auto env = info.Env();

Callers

nothing calls this directly

Calls 3

FunctionClass · 0.85
EnvMethod · 0.80
IsEmptyMethod · 0.80

Tested by

no test coverage detected