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

Function CallWithReceiverAndVector

test/function.cc:110–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110Value CallWithReceiverAndVector(const CallbackInfo& info) {
111 Function func = info[0].As<Function>();
112 Value receiver = info[1];
113 std::vector<napi_value> args;
114 args.reserve(3);
115 args.push_back(info[2]);
116 args.push_back(info[3]);
117 args.push_back(info[4]);
118 return MaybeUnwrap(func.Call(receiver, args));
119}
120
121Value CallWithReceiverAndVectorUsingCppWrapper(const CallbackInfo& info) {
122 Function func = info[0].As<Function>();

Callers

nothing calls this directly

Calls 2

MaybeUnwrapFunction · 0.85
CallMethod · 0.80

Tested by

no test coverage detected