Skip to content

Instantly share code, notes, and snippets.

Created December 2, 2019 08:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
aggregate muxrpc-usage help
module.exports = function (sbot, cb) {
var help = null (err, data) {
if(!data.type) data.type = 'group'
help = data
var keys = Object.keys(sbot)
var n = keys.length + 1
keys.forEach(function (key) {
if(sbot[key] && 'function' === typeof sbot[key].help)
sbot[key].help(function (err, data) {
if(!data.type) data.type = 'group'
help.commands[key] = data
else --n
function done (err) {
if(--n) return
cb(null, help)
require('ssb-client')(function (err, rpc) {
if(err) throw err
module.exports(rpc, function (err, data) {
console.log(JSON.stringify(data, null, 2))
Copy link

I am really impressed with the topics you share, I will visit your posts more often. nytimes crossword

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment