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

Function NAN_MODULE_INIT

test/cpp/wrappedobjectfactory.cpp:123–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121};
122
123NAN_MODULE_INIT(Init) {
124 Nan::HandleScope scope;
125
126 InnerObject::Init(target);
127 MyObject::Init(target);
128 v8::Local<v8::FunctionTemplate> tpl =
129 New<v8::FunctionTemplate>(MyObject::NewInstance);
130
131 Set(target
132 , New<v8::String>("newFactoryObjectInstance").ToLocalChecked()
133 , GetFunction(tpl).ToLocalChecked()
134 );
135}
136
137NODE_MODULE(wrappedobjectfactory, Init)

Callers

nothing calls this directly

Calls 3

ToLocalCheckedMethod · 0.80
SetFunction · 0.50
GetFunctionFunction · 0.50

Tested by

no test coverage detected