@bidilens/terminal
v0.3.0
Published
Honest best-effort bidi formatting and diagnostics for terminals and plain-text channels.
Maintainers
Readme
@bidilens/terminal
Best-effort terminal/plain-text formatting with explicit limitations. No portable API can force every terminal emulator to shape or reorder RTL text, so the default returns the original logical string unchanged.
npm install @bidilens/terminalimport { formatTerminalText } from '@bidilens/terminal';
const safe = formatTerminalText(source); // unchanged source
const compatibility = formatTerminalText(source, { mode: 'unicode-isolates' });
console.log(compatibility.text); // explicit, reversible control insertionNever persist the compatibility output or send it to a model; keep
result.source. ANSI escape sequences are masked during analysis without
changing offsets. Test each target emulator's display and clipboard behavior.
Run pnpm --filter @bidilens/terminal example after building.
