Function inverse

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

    Example

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

    Returns

    input string with inverse format.

    Parameters

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

    Returns string