Class RandomStyleGeneratorFactory

This factory handles the generation of random styles for a console interface. It returns a style generator function that accesses the list of styles to choose from of this factory instance.

Constructors

Properties

assignedStyles: Map<string, string> = ...

The internal lookup that is used in order to memoize the color that has been assigned once.

colors: string[]

The lookup to get random styles from

lastStyleIndex: number = 0

Memoizes the last index of color taken from the colors list.

The property of LogMessages to generate random styles for

Methods