Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
chore: make keytar context aware (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound authored and shiftkey committed May 16, 2019
1 parent 353f9dc commit 95d1355
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/main.cc
Expand Up @@ -65,14 +65,18 @@ NAN_METHOD(FindCredentials) {
Nan::AsyncQueueWorker(worker);
}

void Init(v8::Local<v8::Object> exports) {
Nan::SetMethod(exports, "getPassword", GetPassword);
Nan::SetMethod(exports, "setPassword", SetPassword);
Nan::SetMethod(exports, "deletePassword", DeletePassword);
Nan::SetMethod(exports, "findPassword", FindPassword);
Nan::SetMethod(exports, "findCredentials", FindCredentials);
NAN_MODULE_INIT(Init) {
Nan::SetMethod(target, "getPassword", GetPassword);
Nan::SetMethod(target, "setPassword", SetPassword);
Nan::SetMethod(target, "deletePassword", DeletePassword);
Nan::SetMethod(target, "findPassword", FindPassword);
Nan::SetMethod(target, "findCredentials", FindCredentials);
}

} // namespace

#if NODE_MAJOR_VERSION >= 10
NAN_MODULE_WORKER_ENABLED(keytar, Init)
#else
NODE_MODULE(keytar, Init)
#endif

0 comments on commit 95d1355

Please sign in to comment.