flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
12
BACK_BACK/node_modules/simple-update-notifier/src/borderedText.ts
generated
vendored
Executable file
12
BACK_BACK/node_modules/simple-update-notifier/src/borderedText.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue