ansiparse

Parse ANSI color codes

npm install ansiparse
9 downloads in the last day
80 downloads in the last week
385 downloads in the last month

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' } ]
npm loves you