Prints a message to the console with a consistent tidyomics style. A package-specific prefix is automatically added based on the calling package name, followed by the message text. Different message types are displayed using appropriate styles from the cli package.

tidy_message(message, type = c("info", "success", "warning", "danger"))

Arguments

message

A character string containing the message to display.

type

The type of message to display. One of "info", "success", "warning", or "danger". Defaults to "info".

Value

Invisibly returns NULL. Called for side effects (printing a styled message to the console).

Examples

tidy_message("Loading data...", type = "info")
#>  Console says: Loading data...
tidy_message("Data loaded successfully!", type = "success")
#>  Console says: Data loaded successfully!