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.
| 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. |
| 91 | static Napi::Value AddonFactory(const Napi::CallbackInfo& info) { |
| 92 | return Addon::Init(info.Env(), info[0]); |
| 93 | } |
| 94 | |
| 95 | Napi::Object InitAddonData(Napi::Env env) { |
| 96 | return Napi::Function::New(env, AddonFactory); |