| 74 | } |
| 75 | |
| 76 | static NAN_METHOD(NewInstance) { |
| 77 | v8::Local<v8::Function> cons = Nan::New(constructor()); |
| 78 | double value = info[0]->IsNumber() ? To<double>(info[0]).FromJust() : 0; |
| 79 | const int argc = 1; |
| 80 | v8::Local<v8::Value> argv[1] = {Nan::New(value)}; |
| 81 | info.GetReturnValue().Set( |
| 82 | Nan::NewInstance(cons, argc, argv).ToLocalChecked()); |
| 83 | } |
| 84 | |
| 85 | private: |
| 86 | explicit MyObject(double value = 0) : value_(value) {} |
nothing calls this directly
no test coverage detected