The tiniest and the fastest library for terminal output formatting with ANSI colors
89
A simple command-line status logger that outputs messages with appropriate color coding based on message severity levels.
Implement a status logging utility that accepts messages with different severity levels and outputs them to the console with appropriate color coding:
The logger should:
@generates
export function log(message, level);The log function accepts:
message (string): The message to displaylevel (string): The severity level - one of: "error", "warning", "success", "info", "debug", "trace", "critical"Provides terminal color formatting support.
Install with Tessl CLI
npx tessl i tessl/npm-picocolorsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10