Function bold

  • Takes an input string and adds the ANSI codes for bold text.

    Example

    bold("Vangware"); // "\x1b[1mVangware\x1b[22m"
    // It can also be used as a tag function for tagged templates:
    bold`Vangware`; // "\x1b[1mVangware\x1b[22m"

    Returns

    input string with bold format.

    Parameters

    • input: string | Readonly<TemplateStringsArray>
    • Rest ...expressions: ReadOnlyArray<unknown>

    Returns string