Allow color functions to receive a parameter of any type
Open
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 681
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Is is slightly annoying to have to call `toString` on parameters that are not original string when using colors. For example, you cannot do:
```ts
console.log(red(new Date());
```
As date is not a string. Ideally `red` accepts anything and converts it to its string representation using `toString`.
**Describe the solution you'd like**
Add a string conversion internally if the parameters is not a string.
**Describe alternatives you've considered**
Not really any alternatives.
Contributor guide
Assessment
This issue has not been assessed yet.