Consider utils for colored strings #92
Labels
⚡️ effort:low
enhancement
New feature or request
🌶️ spicy
Seems exciting to work on
🙏 wanted
We have a use case for this
Milestone
The Deno standard library provides color functions, which wrap strings in ANSI color codes, resulting in the strings appearing as various colors in the console. This has some rough edges, in particular around string length which is augmented by the color codes but not visible, making it easy to become confused and introduce errors.
We should consider something like a
FormattedString
class which wraps the desired abilities, but could expose common string properties likelength
with respect to the original input string. This would be useful inevalCodeBlocks
and upcomingCursor
functions, but could also widely be used inDeno.customInspect
functions to customize console log output for all scripts or classes.The text was updated successfully, but these errors were encountered: