textos
v1.0.0
Published
A library to format text with unicode fonts and effects
Downloads
12
Maintainers
Readme
Unicode Text Formatter
A lightweight library to format text with unicode fonts and effects.
Installation
npm i textosUsage
import { formatText } from 'unicode-text-formatter';
// Basic usage
const result = formatText({
text: "Hello World",
font: "bold",
effects: ["italic"]
});
console.log(result);Available Fonts
bold- Bold mathematical fontmonospace- Monospace fontsans- Sans-serif fontserifBold- Bold serif font
Available Effects
bold- Wraps text with*italic- Wraps text with_strike- Wraps text with~code- Wraps text with backticks
API
formatText(options: FormatOptions): string
Formats text with the specified font and effects.
Options:
text: Input string (default: "")font: Font type (default: "bold")effects: Array of effects (default: [])
