Files: 401c797bb92a373ffa4499d47ecea37f75e2a16e / lib / unique-roots.js
252 bytesRaw
1 | const pull = require('pull-stream') |
2 | |
3 | module.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