git ssb

1+

Matt McKegg / mutant



Tree: b9445832e31d8b9279595a8b40c71be0fc1bc40e

Files: b9445832e31d8b9279595a8b40c71be0fc1bc40e / watch.js

298 bytesRaw
1module.exports = watch
2
3function watch (observable, listener) {
4 listener = listener || noop
5 if (typeof observable === 'function') {
6 var remove = observable(listener)
7 listener(observable())
8 return remove
9 } else {
10 listener(observable)
11 return noop
12 }
13}
14
15function noop () {}
16

Built with git-ssb-web