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

Function Construct

test/function_reference.cc:174–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174Value Construct(const CallbackInfo& info) {
175 EscapableHandleScope scope(info.Env());
176 FunctionReference ref;
177 ref.Reset(info[0].As<Function>());
178
179 return scope.Escape(MaybeUnwrapOr(ref.New({}), Object()));
180}
181} // namespace
182
183Object InitFunctionReference(Env env) {

Callers

nothing calls this directly

Calls 6

MaybeUnwrapOrFunction · 0.85
ObjectClass · 0.85
EnvMethod · 0.80
ResetMethod · 0.80
EscapeMethod · 0.80
NewMethod · 0.80

Tested by

no test coverage detected