figures
Unicode symbols with Windows CMD fallbacks
Windows CMD only supports a limited character set.
Install
$ npm install --save figures
Usage
See the source for supported symbols.
const figures = require('figures');
console.log(figures('âï¸ check'));
// On real OSes: âï¸ check
// On Windows: â check
console.log(figures.tick);
// On real OSes: âï¸
// On Windows: â
API
figures(input)
Returns the input with replaced fallback unicode symbols on Windows.
All the below figures are attached to the main export as shown in the example above.
input
Type: string
String where the unicode symbols will be replaced with fallback symbols depending on the OS.
Figures
Name | Real OSes | Windows |
---|---|---|
tick | â | â |
cross | â | Ã |
star | â | * |
square | â | â |
squareSmall | â» | [ ] |
squareSmallFilled | â¼ | [â] |
play | ⶠ| ⺠|
circle | ⯠| ( ) |
circleFilled | â | (*) |
circleDotted | â | ( ) |
circleDouble | â | ( ) |
circleCircle | â | (â) |
circleCross | ⧠| (Ã) |
circlePipe | â¾ | (â) |
circleQuestionMark | ?â | (?) |
bullet | â | * |
dot | ⤠| . |
line | â | â |
ellipsis | ⦠| ... |
pointer | ⯠| > |
pointerSmall | ⺠| » |
info | â¹ | i |
warning | â | â¼ |
hamburger | â° | â¡ |
smiley | 㡠| ⺠|
mustache | à·´ | âââ |
heart | ⥠| ⥠|
arrowUp | â | â |
arrowDown | â | â |
arrowLeft | â | â |
arrowRight | â | â |
radioOn | â | (*) |
radioOff | ⯠| ( ) |
checkboxOn | â | [Ã] |
checkboxOff | â | [ ] |
checkboxCircleOn | ⧠| (Ã) |
checkboxCircleOff | â¾ | ( ) |
questionMarkPrefix | ?â | ï¼ |
oneHalf | ½ | 1/2 |
oneThird | â | 1/3 |
oneQuarter | ¼ | 1/4 |
oneFifth | â | 1/5 |
oneSixth | â | 1/6 |
oneSeventh | â | 1/7 |
oneEighth | â | 1/8 |
oneNinth | â | 1/9 |
oneTenth | â | 1/10 |
twoThirds | â | 2/3 |
twoFifths | â | 2/5 |
threeQuarters | ¾ | 3/4 |
threeFifths | â | 3/5 |
threeEighths | â | 3/8 |
fourFifths | â | 4/5 |
fiveSixths | â | 5/6 |
fiveEighths | â | 5/8 |
sevenEighths | â | 7/8 |
Related
- log-symbols - Colored symbols for various log levels
License
MIT © Sindre Sorhus