You could try this:
totalVestingShares = 0;
totalVestingFundSteem = 0;
steem.api.getDynamicGlobalProperties((err, result) => {
totalVestingShares = result.total_vesting_shares;
totalVestingFundSteem = result.total_vesting_fund_steem;
});
steem.api.getAccounts(['rishi556', 'clauxklein'], function(err, result) {
if (!err) {
for (let i = 0; i < result.length; ++ i) {
var steemPower = steem.formatter.vestToSteem(result[i].vesting_shares, totalVestingShares, totalVestingFundSteem);
log(result[i].name + "'s SteemPower is " + steemPower);
}
} else {
log("Steem API Error: ", err);
}
});
Thanks, this worked exactly like I needed it to.