forked from orbit-oss/chalk
remove has-ansi and strip-ansi dependencies
This commit is contained in:
parent
83615f2ed6
commit
04cae226cc
4 changed files with 0 additions and 40 deletions
21
readme.md
21
readme.md
|
|
@ -140,27 +140,6 @@ 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/chalk/has-ansi).
|
||||
|
||||
### chalk.stripColor(string)
|
||||
|
||||
[Strip color](https://github.com/chalk/strip-ansi) from a string.
|
||||
|
||||
Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
let styledString = getText();
|
||||
|
||||
if (!chalk.supportsColor) {
|
||||
styledString = chalk.stripColor(styledString);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Styles
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue