cabal-club / cabal-client

interface for writing peer-to-peer chat clients
GNU General Public License v3.0
95 stars 14 forks source link

Add method for joining many cabals #42

Open cblgh opened 4 years ago

cblgh commented 4 years ago

Cabal client is still a bit rough to get going with, people resort to reading the cabal-cli source as the canonical documentation.

One thing that could help is extracting the logic for joining many cabals, which is a common enough usecase that it should just be supported outright.

from cli

  var pendingCabals = args.new ? [client.createCabal()] : keys.map(client.addCabal.bind(client))
  Promise.all(pendingCabals).then(() => { /* do stuff */ })