Skip to content

Instantly share code, notes, and snippets.

@jpbochi
Created March 2, 2023 09:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpbochi/45f222d1271e84dfb6bfdf2b00aa831f to your computer and use it in GitHub Desktop.
Save jpbochi/45f222d1271e84dfb6bfdf2b00aa831f to your computer and use it in GitHub Desktop.
import chalk from 'chalk';
import isUnicodeSupported from 'is-unicode-supported';
const main = {
info: chalk.blue('ℹ'),
success: chalk.green('✔'),
warning: chalk.yellow('⚠'),
error: chalk.red('✖'),
};
const fallback = {
info: chalk.blue('i'),
success: chalk.green('√'),
warning: chalk.yellow('‼'),
error: chalk.red('×'),
};
const logSymbols = isUnicodeSupported() ? main : fallback;
export default logSymbols;
@jpbochi
Copy link
Author

jpbochi commented Mar 2, 2023

@jpbochi
Copy link
Author

jpbochi commented Apr 23, 2024

I'm actually using for errors. is also a good candidate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment