Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Parse ANSI color codes
JavaScript
Branch: master
Pull request Compare This branch is 8 commits behind mmalecki:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
LICENSE
README.md
package.json

README.md

ansiparse Build Status

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' } ]
Something went wrong with that request. Please try again.