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

Function HasPropertyWithCStyleString

test/object/has_property.cc:19–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19Value HasPropertyWithCStyleString(const CallbackInfo& info) {
20 Object obj = info[0].UnsafeAs<Object>();
21 String jsKey = info[1].As<String>();
22 return Boolean::New(info.Env(),
23 MaybeUnwrapOr(obj.Has(jsKey.Utf8Value().c_str()), false));
24}
25
26Value HasPropertyWithUint32(const CallbackInfo& info) {
27 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