jayrbolton / dat-wot

[WIP] A decentralized public key network with encryption utilities for data collaboration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use async throughout

okdistribute opened this issue · comments

commented

This library will probably be used in other applications and so should be async. There are some synchronous fs calls

@Karissa: Do y'all minimalists have a minimalistic lib for helping to manage async using only callbacks without promises or anything? eg it'd be cool to do such things as:

  • run [a, b, c] in parallel and call cb when all our done
  • run [a, b, c] in sequence with each taking as input the callback result from the previous
commented

Yes, in fact! run-parallel and run-series and run-waterfall

I made everything async with run-waterfall and run-parallel and stuck to the callback(err, result) convention. For example: https://github.com/jayrbolton/dat-pki/blob/master/lib/checkHandshake.js