MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / HasOwnPropertyWithNapiValue

Function HasOwnPropertyWithNapiValue

test/object/has_own_property.cc:6–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using namespace Napi;
5
6Value HasOwnPropertyWithNapiValue(const CallbackInfo& info) {
7 Object obj = info[0].UnsafeAs<Object>();
8 Name key = info[1].As<Name>();
9 return Boolean::New(
10 info.Env(),
11 MaybeUnwrapOr(obj.HasOwnProperty(static_cast<napi_value>(key)), false));
12}
13
14Value HasOwnPropertyWithNapiWrapperValue(const CallbackInfo& info) {
15 Object obj = info[0].UnsafeAs<Object>();

Callers

nothing calls this directly

Calls 3

MaybeUnwrapOrFunction · 0.85
EnvMethod · 0.80
HasOwnPropertyMethod · 0.80

Tested by

no test coverage detected