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

Function NAN_MODULE_INIT

test/cpp/buffer.cpp:53–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51
52
53NAN_MODULE_INIT(Init) {
54 for (unsigned char i = 0; i < DATA_SIZE; i++) {
55 data[i] = 'a' + i;
56 }
57 Set(target
58 , New<v8::String>("new1").ToLocalChecked()
59 , GetFunction(New<v8::FunctionTemplate>(New1)).ToLocalChecked()
60 );
61 Set(target
62 , New<v8::String>("new2").ToLocalChecked()
63 , GetFunction(New<v8::FunctionTemplate>(New2)).ToLocalChecked()
64 );
65 Set(target
66 , New<v8::String>("new3").ToLocalChecked()
67 , GetFunction(New<v8::FunctionTemplate>(New3)).ToLocalChecked()
68 );
69 Set(target
70 , New<v8::String>("copy").ToLocalChecked()
71 , GetFunction(New<v8::FunctionTemplate>(Copy)).ToLocalChecked()
72 );
73}
74
75NODE_MODULE(buffer, Init)

Callers

nothing calls this directly

Calls 3

ToLocalCheckedMethod · 0.80
SetFunction · 0.50
GetFunctionFunction · 0.50

Tested by

no test coverage detected