1.2.6 • Published 3 years ago

ansi-html-string v1.2.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

ansi-html-string Latest Version

Convert ANSI escape sequences to html strings

Installation

npm install ansi-html-string

Usage

var { createConverter } = require('ansi-html-string');
var converter = createConverter()
var str = converter.toHtml('\x1b[35mhelloworld\x1b[0m');

Options

var str = createConverter({
  minimumContrastRatio: 4.5,
  theme: {
    background: "#23272e", // default background
    foreground: "#abb2bf", // default foreground
    red: "#000000",
    ...
  },
}).toHtml('\x1b[35mhelloworld\x1b[0m');

Generate simple html template

var str = createConverter().toDemo('\x1b[31;1;3;4;7;9mhelloworld\x1b[0m');
1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago