strip-ansi
Strip ANSI escape codes from a string
Last updated 7 months ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install strip-ansi 
SYNC missed versions from official npm registry.

strip-ansi

Strip ANSI escape codes from a string

[!NOTE] Node.js has this built-in now with stripVTControlCharacters. The benefit of this package is consistent behavior across Node.js versions and faster improvements. The Node.js version is actually based on this package.

Install

npm install strip-ansi

Usage

import stripAnsi from 'strip-ansi';

stripAnsi('\u001B[4mUnicorn\u001B[0m');
//=> 'Unicorn'

stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
//=> 'Click'

Related

Maintainers

Current Tags

  • 7.2.0                                ...           latest (2 months ago)
  • 6.0.1                                ...           version6 (5 years ago)

22 Versions

  • 7.2.0                                ...           2 months ago
  • 7.1.2                                ...           7 months ago
  • 7.1.0                                ...           3 years ago
  • 6.0.1                                ...           5 years ago
  • 7.0.1                                ...           5 years ago
  • 7.0.0                                ...           5 years ago
  • 6.0.0                                ...           6 years ago
  • 5.2.0                                ...           7 years ago
  • 5.1.0                                ...           7 years ago
  • 5.0.0                                ...           8 years ago
  • 4.0.0                                ...           9 years ago
  • 3.0.1                                ...           10 years ago
  • 3.0.0                                ...           11 years ago
  • 2.0.1                                ...           11 years ago
  • 2.0.0                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
  • 0.3.0                                ...           12 years ago
  • 0.2.2                                ...           12 years ago
  • 0.2.1                                ...           12 years ago
  • 0.2.0                                ...           12 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 24
This Week 149
This Month 458
Last Day 91
Last Week 217
Last Month 1,124
Dependencies (1)
Dev Dependencies (3)
Dependents (158)

Copyright 2013 - present © cnpmjs.org | Home |