1.2.6 • Published 2 years ago

ansi-html-string v1.2.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago