Update readme.md
This commit is contained in:
parent
ebf961e585
commit
d992309621
1 changed files with 6 additions and 9 deletions
15
readme.md
15
readme.md
|
|
@ -18,12 +18,14 @@
|
||||||
- Clean and focused
|
- Clean and focused
|
||||||
- Auto-detects color support
|
- Auto-detects color support
|
||||||
- Actively maintained
|
- Actively maintained
|
||||||
- [Used by 200+ modules](https://npmjs.org/browse/depended/chalk)
|
- [Used by 300+ modules](https://npmjs.org/browse/depended/chalk)
|
||||||
|
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
Install with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`
|
```
|
||||||
|
npm install --save chalk
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
@ -113,10 +115,10 @@ Example:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var chalk = require('chalk');
|
var chalk = require('chalk');
|
||||||
var styledString = fromExternal();
|
var styledString = getText();
|
||||||
|
|
||||||
if (!chalk.supportsColor) {
|
if (!chalk.supportsColor) {
|
||||||
chalk.stripColor(styledString);
|
styledString = chalk.stripColor(styledString);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -159,8 +161,3 @@ if (!chalk.supportsColor) {
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||||
|
|
||||||
|
|
||||||
-
|
|
||||||
|
|
||||||
[](https://bitdeli.com/free "Bitdeli Badge")
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue