node-getpass
node-getpass copied to clipboard
Please add a promise returning function to the API.
Hello ! Thanks for your very useful lib.
I would like to have directly in your API an async function returning a promise like :
async function asyncGetPass (opts)
{
function get_passphrase (resolve, reject)
{
function on_passphrase (error, password)
{
if (error) { reject (error); }
else { resolve (password); }
}
getPass (opts, on_passphrase);
}
return new Promise (get_passphrase)
}
Then I will not need to add this anymore in all my scripts.
Best regards.