Files: 58ab0241031aa549a35cce1e678c27065ae66221 / lib / unique-roots.js
235 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 | }) |
11 | } |
12 |
Built with git-ssb-web