Preview: borderedText.ts
Size: 371 B
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/simple-update-notifier/src/borderedText.ts
const borderedText = (text: string) => {
const lines = text.split('\n');
const width = Math.max(...lines.map((l) => l.length));
const res = [`┌${'─'.repeat(width + 2)}┐`];
for (const line of lines) {
res.push(`│ ${line.padEnd(width)} │`);
}
res.push(`└${'─'.repeat(width + 2)}┘`);
return res.join('\n');
};
export default borderedText;
Directory Contents
Dirs: 0 × Files: 11