ansi_up

by drudru

drudru / ansi_up

A javascript library that converts text with ANSI terminal codes into colorful HTML

498 Stars 77 Forks Last release: over 1 year ago (v4.0.4) MIT License 121 Commits 9 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

ansi_up.js

ansi_up is an easy to use library that transforms text containing ANSI color escape codes into HTML.

This module is a single Javascript file with no dependencies. It is "isomorphic" javascript. This is just another way of saying that the ansi_up.js file will work in both the browser or node.js. The js library is compiled from TypeScript and its type description ships with the NPM. This code has been used in production since 2011 and is actively maintained.

For example, turn this terminal output:

ESC[1;Foreground
[1;30m 30  [1;30m 30  [1;30m 30  [1;30m 30  [1;30m 30  [1;30m 30  [1;30m 30  [1;30m 30  [0m
[1;31m 31  [1;31m 31  [1;31m 31  [1;31m 31  [1;31m 31  [1;31m 31  [1;31m 31  [1;31m 31  [0m
[1;32m 32  [1;32m 32  [1;32m 32  [1;32m 32  [1;32m 32  [1;32m 32  [1;32m 32  [1;32m 32  [0m
...

...into this browser output:

Browser Example

    
    

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.