Files
skills-here-run-place/node_modules/widest-line/index.js
Alejandro Martinez f09af719cf Initial commit
2026-02-12 02:04:10 +01:00

12 lines
228 B
JavaScript

import stringWidth from 'string-width';
export default function widestLine(string) {
let lineWidth = 0;
for (const line of string.split('\n')) {
lineWidth = Math.max(lineWidth, stringWidth(line));
}
return lineWidth;
}