# ansi-webkit

> Print ANSI escaped colors in a browser console

Latest version **1.0.1** (published 2014-09-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install ansi-webkit
pnpm add ansi-webkit
yarn add ansi-webkit
bun add ansi-webkit
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2014-09-18 |
| First published | 2014-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | simo |
| Maintainers | simov |
| Keywords | ansi, colors, console, log, browser, webkit |

## Links

- npm: https://www.npmjs.com/package/ansi-webkit
- Repository: https://github.com/simov/ansi-webkit
- Issues: https://github.com/simov/ansi-webkit/issues
- npm.io page: https://npm.io/package/ansi-webkit

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2014-09-18
- 1.0.0 — 2014-09-11

## README

# ANSI-WebKit

## turns this

![ansi][1]


## into this

![webkit][2]


## how

```js
var aw = require('ansi-webkit');
var str = '[42m[31m[1mspawn[22m[39m[49m ';
console.log.apply(console, aw.parse(str));
```


## example

```js
// show the dev tools by default
require('nw.gui').Window.get().showDevTools().resizeTo(800, 1000);
var aw = require('ansi-webkit');

var spawn = require('child_process').spawn,
  child = spawn('node', ['spawn.js']);

child.stdout.on('data', function (e) {
  var str = e.toString().trim();
  // ansi
  console.log(str);
  // parsed
  console.log.apply(console, aw.parse(str));
});

child.stderr.on('data', function (e) {
  var str = e.toString().trim();
  console.log(str);
});
```

## license

MIT


  [1]: http://i.imgur.com/gyPudQz.png
  [2]: http://i.imgur.com/hZJxhID.png

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