Promises
var kbyte = require('kbyte');
bluebird.promisifyAll(kbyte.Client.prototype);// So instead of writing client.request('get_peers', null, cb); you have to write:
return client.requestAsync('get_peers', null).then(function(result) {
console.log(result); // => ['wss://byteroll.com/bb', 'wss://byteball.fr/bb' ...]
});Last updated