void NfcTagProxy::bindProxy(Handle<Object> exports) { if (proxyTemplate.IsEmpty()) { getProxyTemplate(); } // use symbol over string for efficiency Handle<String> nameSymbol = String::NewSymbol("NfcTag"); Local<Function> proxyConstructor = proxyTemplate->GetFunction(); exports->Set(nameSymbol, proxyConstructor); }
void PushbotsModule::bindProxy(Handle<Object> exports) { if (proxyTemplate.IsEmpty()) { getProxyTemplate(); } // use symbol over string for efficiency Handle<String> nameSymbol = String::NewSymbol("Pushbots"); Local<Function> proxyConstructor = proxyTemplate->GetFunction(); Local<Object> moduleInstance = proxyConstructor->NewInstance(); exports->Set(nameSymbol, moduleInstance); }