frontend/.pnpm-store/v3/files/06/16cda30c0ce639c7a33ed8c9e766ff0593c70fe880b2df52e19b7d58395b835ea0d93249bf95fc5b96cdb3296380765f15e804ae368d8c85d8b9baf3677b7e

12 lines
228 B
Plaintext

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;
}