# stripcolorcodes

> Remove color codes (special characters) with nodejs

Latest version **0.1.0** (published 2012-04-13) · 0 weekly downloads

## Install

```sh
npm install stripcolorcodes
pnpm add stripcolorcodes
yarn add stripcolorcodes
bun add stripcolorcodes
```

Provides the command `stripcolorcodes`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2012-04-13 |
| First published | 2012-04-13 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Filirom1 |
| Maintainers | Filirom1 |

## Links

- npm: https://www.npmjs.com/package/stripcolorcodes
- Repository: git@github.com/Filirom1/stripcolorcodes
- npm.io page: https://npm.io/package/stripcolorcodes

## Recent versions

- 0.1.0 (latest) — 2012-04-13

## README

# StripColorCodes

When using libs like [colors](https://github.com/marak/colors.js/) your
shell is beautifull but if you store the result in a file, it's not so
good :-/

    $ vim myLog
    
    20120413045946 ^[[34mdebug:  ^[[39m […n/my-service] Starting my-service on 0.0.0.0:8080 in dev mode·
    20120413045946 ^[[34mdebug:  ^[[39m […n/my-service] my-service started.·


You have all those ugly codes `^[[34m` everywhere in your logs.


STOP worring about this, use StripColorCodes !

    $ npm install -g stripcolorcodes

You can use it with unix pipe:

    $ cat /root/.forever/T9ZW.log | stripcolorcodes
    20120413045946 debug:   […n/my-service] Starting my-service on 0.0.0.0:8080 in dev mode
    20120413045946 debug:   […n/my-service] my-service started.

Or with a file:

    $ stripcolorcodes /root/.forever/T9ZW.log
    20120413045946 debug:   […n/my-service] Starting my-service on 0.0.0.0:8080 in dev mode
    20120413045946 debug:   […n/my-service] my-service started.

Or programmatically:

    var stripColorCodes = require('stripcolorcodes');

    fs.readFile(file, function(err, data){
      if(err) return console.error(err);
      process.stdout.write(stripcolorcodes(data.toString()));
    });

Enjoy !

### LICENCE MIT

---
_Source: https://npm.io/package/stripcolorcodes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
