git ssb

1+

Daan Patchwork / patchwork



Tree: 25d8368d34ef870af9b9991d0ece5f0c5436e7e3

Files: 25d8368d34ef870af9b9991d0ece5f0c5436e7e3 / lib / unique-roots.js

252 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 return false
11 })
12}
13

Built with git-ssb-web