MCPcopy Create free account
hub / github.com/nodejs/nan / NAN_PROPERTY_QUERY

Function NAN_PROPERTY_QUERY

test/cpp/namedinterceptors.cpp:115–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115NAN_PROPERTY_QUERY(NamedInterceptor::PropertyQuery) {
116 Nan::Utf8String s(property);
117 if (!std::strcmp(*s, "thing")) {
118 info.GetReturnValue().Set(Nan::New<v8::Integer>(v8::DontEnum));
119 return Intercepted::Yes();
120 }
121 if (!std::strcmp(*s, "value")) {
122 info.GetReturnValue().Set(Nan::New(0));
123 return Intercepted::Yes();
124 }
125 return Intercepted::Yes();
126}
127
128NODE_MODULE(namedinterceptors, NamedInterceptor::Init)

Callers

nothing calls this directly

Calls 4

YesFunction · 0.85
NewFunction · 0.50
SetMethod · 0.45
GetReturnValueMethod · 0.45

Tested by

no test coverage detected