-
-
Notifications
You must be signed in to change notification settings - Fork 857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.format support #8
Comments
Not sure if @sindresorhus wants to include this functionality or not, but for the time being you can use the
|
No need. console.log already supports simple string substitution. This should work: console.log(chalk.underline.red('Detected %d Error(s)'), 1); I've added an example to the readme ;) |
The point was using util.format and proving some sugar in the chalk api
|
I prefer to keep Chalk focused and your example is actually more verbose than the above. Do feel free to create a tool for this using Chalk though, if this doesn't work for you. That's really what it's for; the most low-level way to colorize. |
It would be nice to have
format
as part of the APIThe text was updated successfully, but these errors were encountered: