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

Function HasPropertyWithNapiValue

test/object/has_property.cc:6–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

MaybeUnwrapOrFunction · 0.85
EnvMethod · 0.80
HasMethod · 0.80

Tested by

no test coverage detected