Skip to content

NXMIX/readable-ansi

Repository files navigation

readable-ansi

styled with prettier Build Status Coverage Status npm Greenkeeper badge

visualize a string that includes ansi codes.

Usage

install

npm i @nxmix/readable-ansi --save

example

import chalk from 'chalk'
import pretty from './src/readable-ansi'

pretty(chalk.red('red'))
// => (红)red(fD) color red/red/back to default foreground color

pretty('\x1b[1A\x1b[1B')
// => (↑¹)(↓¹) cursor-up/cursor-down

This project follows the all-contributors specification. Contributions of any kind are welcome!