ansiparse
v0.1.0
Published
Parse ANSI color codes
Downloads
742
Readme
ansiparse
Copyright (C) 2011 by Maciej Małecki
MIT License (see LICENSE file)
ansiparse parses ANSI color codes.
Installation
npm install ansiparse
Usage
var ansiparse = require('ansiparse');
require('colors');
ansiparse('red'.red + ' ' + 'green'.green);
// => [ { foreground: '31', text: 'red' }, { text: ' ' }, { foreground: '32', text: 'green' } ]