MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / SafeConstruct

Function SafeConstruct

src/util/helpers.cpp:53–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53inline Napi::Object SafeConstruct(Napi::Env env, Napi::Function constructor) {
54 napi_value result;
55 if (napi_new_instance(env, constructor, 0, NULL, &result) != napi_ok) return Napi::Object();
56 return Napi::Object(env, result);
57}
58
59inline Napi::Value SafeGet(Napi::Env env, Napi::Object obj, napi_value key) {
60 napi_value result;

Callers 2

NODE_METHODFunction · 0.85
NODE_METHODFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected