Signature
Import
Constructors
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
asChromeConsoleLogArguments | any[] | ||
any[] | |||
names | static | (string | number)[] | |
static | typeof Colors | installs String prototype extensions | |
parsed | Colors & { spans: any[]; } | ||
static | { black: number[]; darkGray: number[]; lightGray: number[]; white: number[]; lightRed: number[]; green: number[]; lightGreen: number[]; yellow: number[]; lightYellow: number[]; blue: number[]; lightBlue: number[]; magenta: number[]; lightMagenta: number[]; cyan: number[]; lightCyan: number[]; } | ||
spans | any[] | ||
any |
Methods
Constructs a new instance of the class
Signature
constructor(s?: string);
Parameters
Parameter | Type | Description |
---|---|---|
s | string | a string containing ANSI escape codes. |
asChromeConsoleLogArguments property
Signature
get asChromeConsoleLogArguments(): any[];
browserConsoleArguments property
Signature
names property
installs String prototype extensions
Signature
static get nice(): typeof Colors;
require (‘ansicolor’).nice console.log (‘foo’.bright.red)
parsed property
Signature
get parsed(): Colors & {
spans: any[];
};
rgb property
Signature
spans property
Signature
spans: any[];
Signature
get str(): any;
[Symbol.iterator] method
Signature
[Symbol.iterator](): IterableIterator<any>;
Returns:
IterableIterator<any>
parse method
parses a string containing ANSI escape codes
Signature
Parameters
Returns:
Colors & { spans: any[]; }
{Colors} parsed representation.
strip method
strips ANSI codes from a string
Signature
static strip(s: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
s | string | a string containing ANSI escape codes. |
Returns:
{string} clean string.