Steem.js api comes with functions that return Promises

I just found out, that steem.js comes with api calls that already return Promises. You only have to append Async to the function name and voilà:

"use strict";

const steem = require("steem");

steem.api.getAccountsAsync(["nafestw"]).then(r => {
  console.log(r[0]);
});

All the manual wrapping in promises was totally pointless...

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now