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

Function TestFunctionWithUserData

test/object/object.cc:80–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80Value TestFunctionWithUserData(const CallbackInfo& info) {
81 UserDataHolder* holder = reinterpret_cast<UserDataHolder*>(info.Data());
82 return Number::New(info.Env(), holder->value);
83}
84
85Value EmptyConstructor(const CallbackInfo& info) {
86 auto env = info.Env();

Callers

nothing calls this directly

Calls 2

DataMethod · 0.80
EnvMethod · 0.80

Tested by

no test coverage detected