Function ansi

  • Takes an input number and returns the escape ANSI sequence.

    Example

    ansi(13); // "\x1b[13m"
    ansi(42); // "\x1b[42m"

    Returns

    Escaped ANSI sequence.

    Type Parameters

    • Input extends number

    Parameters

    • input: Input

      Input to escape.

    Returns `[${Input}m`