Skip to main content

Special Chars and emojis

Special chars

Special chars might have different length of chars in your console. For that if you want to declare yourself the length of the character then you should use charLength option.

import { Table } from "console-table-printer";
const bundle = new Table({
title: "My Table",
charLength: { "👍": 2, "✅": 2 },
});

bundle.addRows([
{
Col1: "👍",
Column2: "✅",
SomeOtherCol: "Some Random string",
SomeOtherCol2: "123_sdas",
},
]);

bundle.printTable();
Screenshot