| 55 | #endif // NAPI_VERSION > 5 |
| 56 | |
| 57 | static Napi::Object Init(Napi::Env env, Napi::Object exports) { |
| 58 | napi_status status; |
| 59 | napi_property_descriptor core_prop = {"core", |
| 60 | nullptr, |
| 61 | nullptr, |
| 62 | Getter_Core, |
| 63 | Setter_Core, |
| 64 | nullptr, |
| 65 | napi_enumerable, |
| 66 | nullptr}; |
| 67 | |
| 68 | status = napi_define_properties(env, exports, 1, &core_prop); |
| 69 | NAPI_THROW_IF_FAILED(env, status, Napi::Object()); |
| 70 | |
| 71 | exports.DefineProperty(Napi::PropertyDescriptor::Accessor( |
| 72 | env, exports, "cplusplus", Getter, Setter, napi_enumerable)); |
| 73 | |
| 74 | exports.DefineProperty(Napi::PropertyDescriptor::Accessor<Getter, Setter>( |
| 75 | "templated", napi_enumerable)); |
| 76 | |
| 77 | #if NAPI_VERSION > 5 |
| 78 | PropDescBenchmark::Init(env, exports); |
| 79 | #endif // NAPI_VERSION > 5 |
| 80 | |
| 81 | return exports; |
| 82 | } |
| 83 | |
| 84 | NODE_API_MODULE(NODE_GYP_MODULE_NAME, Init) |
nothing calls this directly
no test coverage detected