src/module.cc
// NativeExtension.cc represents the top level of the module.
// C++ constructs that are exposed to javascript are exported here
NativeExtension.cc represents the top level of the module.
C++ constructs that are exposed to javascript are exported here
NativeExtension . cc represents the top level of the module . C ++ constructs that are exposed to javascript are exported here
NAN_MODULE_INIT(InitAll) {
  Nan::Set(
    target, 
    Nan::New("nothing").ToLocalChecked(),
    Nan::GetFunction(Nan::New<FunctionTemplate>(nothing)).ToLocalChecked()
  );
  Nan::Set(
    target, 
    Nan::New("aString").ToLocalChecked(),
    Nan::GetFunction(Nan::New<FunctionTemplate>(aString)).ToLocalChecked()
  );
  Nan::Set(
    target, 
    Nan::New("aBoolean").ToLocalChecked(),
    Nan::GetFunction(Nan::New<FunctionTemplate>(aBoolean)).ToLocalChecked()
  );
  Nan::Set(
    target, 
    Nan::New("aNumber").ToLocalChecked(),
    Nan::GetFunction(Nan::New<FunctionTemplate>(aNumber)).ToLocalChecked()
  );
  Nan::Set(
    target, 
    Nan::New("anObject").ToLocalChecked(),
    Nan::GetFunction(Nan::New<FunctionTemplate>(anObject)).ToLocalChecked()
  );
  Nan::Set(
    target, 
    Nan::New("anArray").ToLocalChecked(),
    Nan::GetFunction(Nan::New<FunctionTemplate>(anArray)).ToLocalChecked()
  );
  Nan::Set(
    target, 
    Nan::New("callback").ToLocalChecked(),
    Nan::GetFunction(Nan::New<FunctionTemplate>(callback)).ToLocalChecked()
  );
  MyObject::Init(target);
}
NAN_MODULE_INIT ( InitAll ) { Nan :: Set ( target , Nan :: New ( " " ) . ToLocalChecked ( ) , Nan :: GetFunction ( Nan :: New < FunctionTemplate > ( nothing ) ) . ToLocalChecked ( ) ) ; Nan :: Set ( target , Nan :: New ( " " ) . ToLocalChecked ( ) , Nan :: GetFunction ( Nan :: New < FunctionTemplate > ( aString ) ) . ToLocalChecked ( ) ) ; Nan :: Set ( target , Nan :: New ( " " ) . ToLocalChecked ( ) , Nan :: GetFunction ( Nan :: New < FunctionTemplate > ( aBoolean ) ) . ToLocalChecked ( ) ) ; Nan :: Set ( target , Nan :: New ( " " ) . ToLocalChecked ( ) , Nan :: GetFunction ( Nan :: New < FunctionTemplate > ( aNumber ) ) . ToLocalChecked ( ) ) ; Nan :: Set ( target , Nan :: New ( " " ) . ToLocalChecked ( ) , Nan :: GetFunction ( Nan :: New < FunctionTemplate > ( anObject ) ) . ToLocalChecked ( ) ) ; Nan :: Set ( target , Nan :: New ( " " ) . ToLocalChecked ( ) , Nan :: GetFunction ( Nan :: New < FunctionTemplate > ( anArray ) ) . ToLocalChecked ( ) ) ; Nan :: Set ( target , Nan :: New ( " " ) . ToLocalChecked ( ) , Nan :: GetFunction ( Nan :: New < FunctionTemplate > ( callback ) ) . ToLocalChecked ( ) ) ; MyObject :: Init ( target ) ; }
NativeExtension.cc represents the top level of the module.
NativeExtension . cc represents the top level of the module .
// Passing target down to the next NAN_MODULE_INIT