Files: a5b19e9a7af23f8f2cfcf33116137fad4143479b / sbot / async / run.js
315 bytesRaw
1 | const nest = require('depnest') |
2 | const { onceTrue } = require('mutant') |
3 | |
4 | exports.gives = nest('sbot.async.run') |
5 | |
6 | exports.needs = nest({ |
7 | 'sbot.obs.connection': 'first' |
8 | }) |
9 | |
10 | exports.create = (api) => { |
11 | return nest({ |
12 | 'sbot.async.run': function run (fn) { |
13 | onceTrue(api.sbot.obs.connection, fn) |
14 | } |
15 | }) |
16 | } |
17 |
Built with git-ssb-web