UNPKG

bundle-wizard

Version:

Analyze the JavaScript loaded by a website

11 lines (9 loc) 232 B
const calculateCoverage = (totalLength, ranges) => { return ( ranges.reduce((acc, curr) => { const range = curr.end - curr.start return acc + range }, 0) / totalLength ) } module.exports = calculateCoverage