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"

    See

    optionalFormat

    Type Parameters

    • Input extends string | TemplateStringsArray

    Parameters

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

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

    input string with strikethrough format.