Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/jpommerening/hansi
- Owner: jpommerening
- License: mit
- Created: 2013-11-27T08:50:30.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-06-01T19:46:56.000Z (over 10 years ago)
- Last Synced: 2024-04-14T15:48:55.310Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 227 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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);
```