prefix-size.js 263 B

1234567891011
  1. 'use strict'
  2. var sizeChunks = require('./size-chunks.js')
  3. function prefixSize(events, type) {
  4. var tail = events[events.length - 1]
  5. if (!tail || tail[1].type !== type) return 0
  6. return sizeChunks(tail[2].sliceStream(tail[1]))
  7. }
  8. module.exports = prefixSize