Skip to content

Commit 8702496

Browse files
committed
Remove chalk.styles
Very few consumers use this. Those who need it can just use the `ansi-styles` package directly.
1 parent 0412cdf commit 8702496

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,4 @@ function applyStyle() {
155155
Object.defineProperties(Chalk.prototype, styles);
156156

157157
module.exports = new Chalk();
158-
module.exports.styles = ansiStyles;
159158
module.exports.supportsColor = supportsColor;

readme.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,21 +137,6 @@ Detect whether the terminal [supports color](https://github.com/chalk/supports-c
137137

138138
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
139139

140-
### chalk.styles
141-
142-
Exposes the styles as [ANSI escape codes](https://github.com/chalk/ansi-styles).
143-
144-
Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with your own.
145-
146-
```js
147-
const chalk = require('chalk');
148-
149-
console.log(chalk.styles.red);
150-
//=> {open: '\u001b[31m', close: '\u001b[39m'}
151-
152-
console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);
153-
```
154-
155140

156141
## Styles
157142

test.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,3 @@ describe('chalk.constructor', () => {
187187
assert.equal(chalk.red('foo'), '\u001B[31mfoo\u001B[39m');
188188
});
189189
});
190-
191-
describe('chalk.styles', () => {
192-
it('should expose the styles as ANSI escape codes', () => {
193-
assert.equal(chalk.styles.red.open, '\u001B[31m');
194-
});
195-
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy