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

Method GetPrototype

src/util/binder.cpp:36–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 };
35
36 static Napi::Value GetPrototype(Napi::Env env, Napi::Object obj) {
37 napi_value proto;
38 // This can fail (e.g., a Proxy whose getPrototypeOf trap throws), in
39 // which case an empty value is returned and an exception is pending.
40 if (napi_get_prototype(env, obj, &proto) != napi_ok) return Napi::Value();
41 return Napi::Value(env, proto);
42 }
43
44 // An object is "plain" if its prototype is null or a top-level prototype
45 // (i.e., some realm's Object.prototype). Rather than comparing against the

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected