examples/bin/old/promises-example.js
function(callback) {
  async.parallelAsync([
    tox.addGroupchat.bind(tox),
    tox.getAV().addGroupchat.bind(tox.getAV())
  ]).then(function(results) {
    groupchats['text'] = results[0];
    groupchats['av'] = results[1];
  }).finally(callback);
}
function(callback) {
  async.parallelAsync([
    tox.addGroupchat.bind(tox),
    tox.getAV().addGroupchat.bind(tox.getAV())
  ]).then(function(results) {
    groupchats['text'] = results[0];
    groupchats['av'] = results[1];
  }).finally(callback);
}
function ( callback ) { async . parallelAsync ( [ tox . addGroupchat . bind ( tox ) , tox . getAV ( ) . addGroupchat . bind ( tox . getAV ( ) ) ] ) . then ( function ( results ) { groupchats [ 'text' ] = results [ 0 ] ; groupchats [ 'av' ] = results [ 1 ] ; } ) . finally ( callback ) ; }
Initialize the groupchats, and call the callback when finished.
Initialize the groupchats and call the callback when finished .