MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / EmptyConstructor

Function EmptyConstructor

test/object/object.cc:85–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85Value EmptyConstructor(const CallbackInfo& info) {
86 auto env = info.Env();
87 bool isEmpty = info[0].As<Boolean>();
88 Object object = isEmpty ? Object() : Object(env, Object::New(env));
89 return Boolean::New(env, object.IsEmpty());
90}
91
92Value ConstructorFromObject(const CallbackInfo& info) {
93 auto env = info.Env();

Callers

nothing calls this directly

Calls 3

ObjectClass · 0.85
EnvMethod · 0.80
IsEmptyMethod · 0.80

Tested by

no test coverage detected