index.js 427 B

12345678910111213141516171819
  1. 'use strict';
  2. const chalk = require('chalk');
  3. const isUnicodeSupported = require('is-unicode-supported');
  4. const main = {
  5. info: chalk.blue('ℹ'),
  6. success: chalk.green('✔'),
  7. warning: chalk.yellow('⚠'),
  8. error: chalk.red('✖')
  9. };
  10. const fallback = {
  11. info: chalk.blue('i'),
  12. success: chalk.green('√'),
  13. warning: chalk.yellow('‼'),
  14. error: chalk.red('×')
  15. };
  16. module.exports = isUnicodeSupported() ? main : fallback;