git ssb

1+

Daan Patchwork / patchwork



Tree: b6d7ee34ab7b57861dd88fc633ba98bfb721b099

Files: b6d7ee34ab7b57861dd88fc633ba98bfb721b099 / lib / unique-roots.js

235 bytesRaw
1const pull = require('pull-stream')
2
3module.exports = function UniqueRoots () {
4 const included = new Set()
5 return pull.filter(msg => {
6 if (!included.has(msg.rootId)) {
7 included.add(msg.key)
8 return true
9 }
10 })
11}
12

Built with git-ssb-web