Package Exports
- ansi-color-stream
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ansi-color-stream) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ansi-color-stream
colorize a stream with ansi colors
example
Here we create 3 streams and interleave the colored chunks.
var through = require('through2');
var colorize = require('ansi-color-stream');
var a = through();
var b = through();
var c = through();
a.pipe(colorize('bg bright pink fg purple')).pipe(process.stdout);
b.pipe(colorize('purple')).pipe(process.stdout);
c.pipe(colorize('bg cyan fg blue')).pipe(process.stdout);
a.write('AAA');
b.write('BBB');
c.write('CCC\n');
b.write('bb');
c.write('ccc');
a.write('a\n');methods
var colorize = require('ansi-color-stream')var stream = colorize(color)
Return a transform stream that adds color to each of the chunks. color
is a
fuzzy string name or array
that describes the color to use.
install
With npm do:
npm install ansi-color-streamlicense
MIT