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

Function SafeGetElement

src/util/helpers.cpp:65–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65inline Napi::Value SafeGetElement(Napi::Env env, Napi::Object obj, uint32_t index) {
66 napi_value result;
67 if (napi_get_element(env, obj, index, &result) != napi_ok) return Napi::Value();
68 return Napi::Value(env, result);
69}
70
71// Returns false if the check itself failed (leaving an exception pending).
72inline bool SafeHasOwnProperty(Napi::Env env, Napi::Object obj, napi_value key, bool* result) {

Callers 2

xColumnMethod · 0.85
BindArrayMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected