All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
17 lines
361 B
JavaScript
17 lines
361 B
JavaScript
'use strict'
|
|
|
|
// Measure the number of character codes in chunks.
|
|
// Counts tabs based on their expanded size, and CR+LF as one character.
|
|
function sizeChunks(chunks) {
|
|
var index = -1
|
|
var size = 0
|
|
|
|
while (++index < chunks.length) {
|
|
size += typeof chunks[index] === 'string' ? chunks[index].length : 1
|
|
}
|
|
|
|
return size
|
|
}
|
|
|
|
module.exports = sizeChunks
|