1.0.3 • Published 5 years ago

@cakecatz/ansi-parser v1.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

ansi-parser

Parser for string that include ansi codes.

Install

npm i @cakecatz/ansi-parser

Usage

const { parseAnsi } = require("@cakecatz/ansi-parser");
const cells = parseAnsi("\u001b[31mhello\u001b[39m");

cells will be like this.

[
  {
    bg: 0, // COLOR_CODES.BLACK
    fg: 1, // COLOR_CODES.RED
    content: "hello",
    bold: false,
    dim: false,
    inverse: false,
    italic: false,
    underline: false
  }
];
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago