db/index.js
function sumShards(store, cb) {
  exports.lazy(store.metaDb.createValueStream(), cb)
    .map(function(stream) {
      return stream.Shards.filter(function(shard) {
        return shard.SequenceNumberRange.EndingSequenceNumber == null
      }).length
    })
    .sum(function(sum) { return cb(null, sum) })
}
function sumShards(store, cb) {
  exports.lazy(store.metaDb.createValueStream(), cb)
    .map(function(stream) {
      return stream.Shards.filter(function(shard) {
        return shard.SequenceNumberRange.EndingSequenceNumber == null
      }).length
    })
    .sum(function(sum) { return cb(null, sum) })
}
function sumShards ( store , cb ) { exports . lazy ( store . metaDb . createValueStream ( ) , cb ) . map ( function ( stream ) { return stream . Shards . filter ( function ( shard ) { return shard . SequenceNumberRange . EndingSequenceNumber == null } ) . length } ) . sum ( function ( sum ) { return cb ( null , sum ) } ) }
Sum shards that haven't closed yet
Sum shards that haven t closed yet