📅  最后修改于: 2022-03-11 15:03:56.083000             🧑  作者: Mango
const keytar = require('keytar');
keytar.setPassword('KeytarTest', 'AccountName', 'secret');
const secret = keytar.getPassword('KeytarTest', 'AccountName');
secret.then((result) => {
console.log("result: "+ result); // result will be 'secret'
});