git ssb

1+

Daan Patchwork / patchwork



Tree: d3826fa5570d6a70af4cd9401fe6f9284ec0ef5c

Files: d3826fa5570d6a70af4cd9401fe6f9284ec0ef5c / 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