Wait for 1 more or more hypercores to be ready.
$ npm install hypercore-ready --save
const ready = require('hypercore-ready')
ready(...hypercores, (err) => {
// called when all hypercores are ready
})
Waits for all given hypercores
to be ready calling callback(err, pending, total)
when all are ready or when an error occurs.
const cores = [ ...hypercores ]
ready(...cores, callback)
// or
ready(cores)
// or
await ready(cores)
MIT