function printCoverage(entries) {
	const files = {};
	let out = '';
	for (const entry of entries) {
		const orig = entry.text;
		let text = '';
		let index = 0;
		let used = 0;
		// Calculate used characters, and an annotated source with unused code in red:
		for (const range of entry.ranges) {
			const before = orig.substring(index, range.start);
			text += `\u001b[31m${before}`;
			const segment = orig.substring(range.start, range.end);
			text += `\u001b[0m${segment}`;
			index = range.end;
			used += segment.length;
		}
		text += `\u001b[31m${orig.substring(index)}\u001b[0m`;

		const url = entry.url.replace(/^http:\/\/[^/]+/, '');
		const size = orig.length;
		const unused = size - used;
		const percentUnused = Math.round((unused / orig.length) * 100);
		// filename and % unused (red for > 30%, green for less):
		const color = unused / size > 0.3 ? '31' : '32';
		out += `\n${url}: \u001b[${color}m${percentUnused}% unused`;
		// show absolute size values (dim text):
		out += `\u001b[0;3m (${kb(unused)} of ${kb(size)})\u001b[0m:`;
		// If >50% unused, print the annotated source code string:
		if (unused / size > 0.5) out += `\n${text}`;
		files[url] = { used, unused, size };
	}
	return { analysis: out, files };
}
Generate a formatted string containing code coverage analysis, as well as raw data.
@param {import('puppeteer').CoverageEntry[]} entries