Function strikethrough

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

    Example

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

    Returns

    input string with strikethrough format.

    Parameters

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

    Returns string