2013-01-25 07:40:58 +08:00
|
|
|
#include <node.h>
|
|
|
|
#include <v8.h>
|
|
|
|
|
2015-08-19 02:29:10 +08:00
|
|
|
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
2015-08-19 03:02:52 +08:00
|
|
|
v8::Isolate* isolate = args.GetIsolate();
|
2018-11-07 14:50:51 +08:00
|
|
|
args.GetReturnValue().Set(v8::String::NewFromUtf8(
|
2020-07-08 04:03:17 +08:00
|
|
|
isolate, "world").ToLocalChecked());
|
2013-01-25 07:40:58 +08:00
|
|
|
}
|
|
|
|
|
2015-07-18 17:34:16 +08:00
|
|
|
void init(v8::Local<v8::Object> exports, v8::Local<v8::Object> module) {
|
2013-01-25 07:40:58 +08:00
|
|
|
NODE_SET_METHOD(module, "exports", Method);
|
|
|
|
}
|
|
|
|
|
2017-09-06 04:53:06 +08:00
|
|
|
NODE_MODULE(NODE_GYP_MODULE_NAME, init)
|