/
lostSun
/
project-client-server-apps
Обзор
Документация
Войти
/
lostSun
/
project-client-server-apps
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
server/node_modules/simple-update-notifier/src/borderedText.ts
12 строк
371 B
1lostsun
update project
25 май 2025, 13:12
25 май 2025, 13:12
78a0079
Код
Авторство
О чём код?
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;