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

Function AddonFactory

test/addon_data.cc:91–93  ·  view source on GitHub ↗

We use an addon factory so we can cover both the case where there is an instance data hint and the case where there isn't.

Source from the content-addressed store, hash-verified

89// We use an addon factory so we can cover both the case where there is an
90// instance data hint and the case where there isn't.
91static Napi::Value AddonFactory(const Napi::CallbackInfo& info) {
92 return Addon::Init(info.Env(), info[0]);
93}
94
95Napi::Object InitAddonData(Napi::Env env) {
96 return Napi::Function::New(env, AddonFactory);

Callers

nothing calls this directly

Calls 2

EnvMethod · 0.80
InitFunction · 0.70

Tested by

no test coverage detected