All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
12 lines
263 B
JavaScript
12 lines
263 B
JavaScript
'use strict'
|
|
|
|
var sizeChunks = require('./size-chunks.js')
|
|
|
|
function prefixSize(events, type) {
|
|
var tail = events[events.length - 1]
|
|
if (!tail || tail[1].type !== type) return 0
|
|
return sizeChunks(tail[2].sliceStream(tail[1]))
|
|
}
|
|
|
|
module.exports = prefixSize
|