/
brood
/
html-practice-project
Обзор
Документация
Войти
/
brood
/
html-practice-project
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
backend/node_modules/simple-update-notifier/src/borderedText.ts
12 строк
371 B
1xskaeuo
final version
19 дек 2025, 11:53
19 дек 2025, 11:53
9a7fa8b
Код
Авторство
О чём код?
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;