add .hasColor() method - fixes #23

This commit is contained in:
Sindre Sorhus 2014-06-24 21:34:11 +02:00
parent eff96c2c15
commit 90bd6477d6
4 changed files with 15 additions and 1 deletions

View file

@ -109,6 +109,10 @@ console.log(chalk.styles.red);
console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);
```
### chalk.hasColor(string)
Check whether a string [has color](https://github.com/sindresorhus/has-ansi).
### chalk.stripColor(string)
[Strip color](https://github.com/sindresorhus/strip-ansi) from a string.