ansiCmd | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function ansiCmd

    • Generate ANSI-escape codes.

      Parameters

      • ...cmds: AnsiCommand[]

        Command or array of commands to geneate

      Returns string

      ANSI escape sequences. If no terminal is present, empty strings are returned. Use SetAnsiCmdMode to override.

      SetAnsiCmdMode, IsAnsiCmdEnabled

      // Prints a red word
      console.log(`${AnsiCmd("red")}red${AnsiCmd("reset")}`);