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

Function NAN_MODULE_INIT

test/cpp/morenews.cpp:68–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68NAN_MODULE_INIT(Init) {
69 Set(target
70 , New("newNumber").ToLocalChecked()
71 , GetFunction(New<v8::FunctionTemplate>(NewNumber)).ToLocalChecked()
72 );
73 Set(target
74 , New("newNegativeInteger").ToLocalChecked()
75 , GetFunction(New<v8::FunctionTemplate>(NewNegativeInteger))
76 .ToLocalChecked()
77 );
78 Set(target
79 , New("newPositiveInteger").ToLocalChecked()
80 , GetFunction(New<v8::FunctionTemplate>(NewPositiveInteger))
81 .ToLocalChecked()
82 );
83 Set(target
84 , New("newUtf8String").ToLocalChecked()
85 , GetFunction(New<v8::FunctionTemplate>(NewUtf8String)).ToLocalChecked()
86 );
87 Set(target
88 , New("newLatin1String").ToLocalChecked()
89 , GetFunction(New<v8::FunctionTemplate>(NewLatin1String)).ToLocalChecked()
90 );
91 Set(target
92 , New("newUcs2String").ToLocalChecked()
93 , GetFunction(New<v8::FunctionTemplate>(NewUcs2String)).ToLocalChecked()
94 );
95 Set(target
96 , New("newExternalStringResource").ToLocalChecked()
97 , GetFunction(New<v8::FunctionTemplate>(NewExternalStringResource))
98 .ToLocalChecked()
99 );
100 Set(target
101 , New("newExternalAsciiStringResource").ToLocalChecked()
102 , GetFunction(New<v8::FunctionTemplate>(NewExternalAsciiStringResource))
103 .ToLocalChecked()
104 );
105}
106
107NODE_MODULE(morenews, Init)

Callers

nothing calls this directly

Calls 4

ToLocalCheckedMethod · 0.80
SetFunction · 0.50
NewFunction · 0.50
GetFunctionFunction · 0.50

Tested by

no test coverage detected