Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jpommerening/hansi

Streaming ANSI escape sequence parser and HTML generator.
https://github.com/jpommerening/hansi

Last synced: 24 days ago
JSON representation

Streaming ANSI escape sequence parser and HTML generator.

Awesome Lists containing this project

README

        

# hansi

Streaming ANSI escape sequence parser and HTML generator.

## Install

If you're working in nodejs:

```console
$ npm install hansi
npm http GET https://registry.npmjs.org/hansi
npm http 200 https://registry.npmjs.org/hansi
npm http GET https://registry.npmjs.org/hansi/-/hansi-0.1.0.tgz
npm http 200 https://registry.npmjs.org/hansi/-/hansi-0.1.0.tgz
[email protected] node_modules/hansi
```

You can fetch hansi with Bower as well:

```console
$ bower install hansi
```

## Usage

Nodejs:

```js
var hansi = require('hansi');
var stream = new hansi.Stream();

stream.pipe(process.stdout);
process.stdin.pipe(stream);
```

CLI:

```console
npm install | hansi
```

RequireJS:

```js
require(['hansi', 'jquery'], function(hansi, $) {
var stream = new hansi.Stream();
});
```

Globals:

```js
(function(hansi) {
var stream = new hansi.Stream();
})(window.hansi);
```