Skip to content
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

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

Open
YounGoat opened this issue Feb 26, 2018 · 4 comments
Open

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

YounGoat opened this issue Feb 26, 2018 · 4 comments

Comments

@YounGoat
Copy link

YounGoat commented Feb 26, 2018

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,

  • Why aren't they documented in README?
  • My I use colors.strip() safely?
@DABH
Copy link
Contributor

DABH commented Feb 27, 2018

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
Copy link
Author

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
Copy link
Contributor

DABH commented Feb 28, 2018

PR welcome ;)

@Alexsey
Copy link

Alexsey commented Jul 3, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants