git ssb

1+

Matt McKegg / mutant



Tree: 4cc5d7c35493700dc9a40f3cb6da6a2b6e3ce7dc

Files: 4cc5d7c35493700dc9a40f3cb6da6a2b6e3ce7dc / watch.js

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

Built with git-ssb-web