shell-mirror
Version:
Access your Mac shell from any device securely. Perfect for mobile coding with Claude Code CLI, Gemini CLI, and any shell tool.
13 lines (11 loc) • 371 B
text/typescript
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;