tm-essentials
Version:
A lightweight library in Node.js that provides formatting features and little additions for any development related to Trackmania.
41 lines (40 loc) • 917 B
TypeScript
export = TextFormatter;
declare class TextFormatter {
/**
* Regex to match all the formatting codes
* @type {RegExp}
* @private
*/
private static deformatRegex;
/**
* Regex to match all the color formatting codes
* @type {RegExp}
* @private
*/
private static colorRegex;
/**
* Ansi default color
* @type {string}
* @private
*/
private static AnsiDefault;
/**
* Deformat the text
* @param {string} input
* @returns {string}
*/
static deformat(input: string): string;
/**
* Format the text color with ANSI escape codes
* @param {string} input
* @returns {string}
*/
static formatAnsi(input: string): string;
/**
* Convert a color string to ANSI escape codes
* @param {string} input
* @returns {string}
* @private
*/
private static colorToAnsi;
}