Marak / colors.js

get colors in your node.js console
https://github.com/Marak/colors.js
Other
5.17k stars 446 forks source link

Why method strip() and stripColors() not documented? #215

Open YounGoat opened 6 years ago

YounGoat commented 6 years ago

Sometimes I need to un-color the colorful text, but no such methods offered through README.md. I have to write the code snippet by myself. Actually, colors contains such method named colors.strip() or colors.stripColors(). My questions are,

DABH commented 6 years ago

They're safe to use. There is the reset style, which you might want to use instead (e.g. 'test'.blue.reset), but otherwise, yeah,strip()/stripColors` could probably have some documentation added at some point.

YounGoat commented 6 years ago

Thanks for your reply. I continue to hope that the method colors.strip() SHOULD appear in README.md, as a promise that it is supported officially.

DABH commented 6 years ago

PR welcome ;)

Alexsey commented 6 years ago

Maybe reset was intended to be used that way, but because the color of the sting cannot be overwritten it is doing nothing. A mean 'abc'.green.blue will be green and in the same way 'abc'.green.reset would be green as well.