Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ansi-purge

fabiospampinato148.2kMIT1.1.0TypeScript support: included

A tiny function for deleting ANSI escape sequences from a string.

ansi, strip, purge

readme

ANSI Purge

A tiny function for deleting ANSI escape sequences from a string.

Install

npm install ansi-purge

Usage

import color from 'tiny-colors';
import ansiPurge from 'ansi-purge';

// Let's remove ANSI escapes from a string

console.log ( ansiPurge ( color.red ( 'Hello' ) ) ); // => 'Hello'

License

MIT © Fabio Spampinato