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

Function NAN_MODULE_INIT

test/cpp/returnvalue.cpp:38–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38NAN_MODULE_INIT(Init) {
39 global.Reset(New(true));
40
41 Set(target
42 , New<v8::String>("r").ToLocalChecked()
43 , GetFunction(New<v8::FunctionTemplate>(ReturnAValue)).ToLocalChecked()
44 );
45 Set(target
46 , New<v8::String>("p").ToLocalChecked()
47 , GetFunction(New<v8::FunctionTemplate>(ReturnPrimitive)).ToLocalChecked()
48 );
49 Set(target
50 , New<v8::String>("q").ToLocalChecked()
51 , GetFunction(New<v8::FunctionTemplate>(ReturnGlobal)).ToLocalChecked()
52 );
53 Set(target
54 , New<v8::String>("u").ToLocalChecked()
55 , GetFunction(New<v8::FunctionTemplate>(ReturnUnsigned)).ToLocalChecked()
56 );
57}
58
59NODE_MODULE(returnvalue, Init)

Callers

nothing calls this directly

Calls 5

ToLocalCheckedMethod · 0.80
NewFunction · 0.50
SetFunction · 0.50
GetFunctionFunction · 0.50
ResetMethod · 0.45

Tested by

no test coverage detected