static NAN_MODULE_INIT()

in src/ResourceProfiler.hh [16:25]


  static NAN_MODULE_INIT(Init) {
    auto profiler = Nan::New<v8::FunctionTemplate>(New);

    profiler->SetClassName(Nan::New(RESOURCE_PROFILER).ToLocalChecked());
    profiler->InstanceTemplate()->SetInternalFieldCount(1);
    SetPrototypeMethod(profiler, "read", Read);
    constructor().Reset(Nan::GetFunction(profiler).ToLocalChecked());
    Nan::Set(target, Nan::New(RESOURCE_PROFILER).ToLocalChecked(),
             Nan::GetFunction(profiler).ToLocalChecked());
  }