17 lines
366 B
JavaScript
17 lines
366 B
JavaScript
import styles from 'ansi-styles';
|
|
import chalk from '../index.js';
|
|
|
|
// Generates screenshot
|
|
for (const key of Object.keys(styles)) {
|
|
let returnValue = key;
|
|
|
|
if (key === 'reset' || key === 'hidden' || key === 'grey') {
|
|
continue;
|
|
}
|
|
|
|
if (/^bg[^B]/.test(key)) {
|
|
returnValue = chalk.black(returnValue);
|
|
}
|
|
|
|
process.stdout.write(chalk[key](returnValue) + ' ');
|
|
}
|