CoolFace
Apppublic

opusdev/vector-similarity-api

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes
borderedText.ts13 linesDownload Raw Back to src
1const borderedText = (text: string) => {2  const lines = text.split('\n');3  const width = Math.max(...lines.map((l) => l.length));4  const res = [`┌${'─'.repeat(width + 2)}┐`];5  for (const line of lines) {6    res.push(`│ ${line.padEnd(width)} │`);7  }8  res.push(`└${'─'.repeat(width + 2)}┘`);9  return res.join('\n');10};11 12export default borderedText;13