Function underlined

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

    Example

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

    See

    optionalFormat

    Type Parameters

    • Input extends string | TemplateStringsArray

    Parameters

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

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

    input string with underlined format.