feat(cli): /stylize: stl alias for the stylize fn

This commit is contained in:
Lucas Colombo 2024-04-01 01:30:09 -03:00
parent 0c713daa9c
commit 686dcbbc1f
Signed by: lucas
GPG Key ID: EF34786CFEFFAE35
2 changed files with 13 additions and 1 deletions

View File

@ -1,7 +1,7 @@
mod style; mod style;
mod stylizer; mod stylizer;
pub use stylizer::{stylize, Stylize}; pub use stylizer::{stylize, stl, Stylize};
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;

View File

@ -235,3 +235,15 @@ pub fn stylize<S: AsRef<str>>(s: S, instructions: &str) -> String {
formatted formatted
} }
// alias for stylize: stl
/// 🧉 » stl fn
/// --
///
/// Stylizes a string with optional ANSI color and attributes.
///
/// This is an alias for the `stylize` function.
pub fn stl<S: AsRef<str>>(s: S, instructions: &str) -> String {
stylize(s, instructions)
}