| 93 | } |
| 94 | |
| 95 | NAN_METHOD(MyObject::New) { |
| 96 | if (info.IsConstructCall()) { |
| 97 | MyObject* obj = new MyObject(); |
| 98 | obj->Wrap(info.This()); |
| 99 | info.GetReturnValue().Set(info.This()); |
| 100 | } else { |
| 101 | v8::Local<v8::Function> cons = Nan::New<v8::Function>(constructor); |
| 102 | info.GetReturnValue().Set(Nan::NewInstance(cons).ToLocalChecked()); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | NODE_MODULE(settemplate, MyObject::Init) |
nothing calls this directly
no test coverage detected