Function inverse

  • Inverse code wrapper.

    Remarks

    Given an input string, it will return a new string with the ANSI codes for inverse around it.

    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"

    See

    Type Parameters

    • Input extends string | TemplateStringsArray

    Parameters

    • input: Input
    • Rest ...expressions: ReadOnlyArray

    Returns `${Input extends string
        ? Input
        : string}`

    input string with inverse format.