File size: 4,740 Bytes
bc20498 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# figures [](https://travis-ci.org/sindresorhus/figures)
> Unicode symbols with Windows CMD fallbacks
[](index.js)
[*and more...*](index.js)
Windows CMD only supports a [limited character set](http://en.wikipedia.org/wiki/Code_page_437).
## Install
```
$ npm install figures
```
## Usage
See the [source](index.js) for supported symbols.
```js
const figures = require('figures');
console.log(figures('βοΈ check'));
// On non-Windows OSes: βοΈ check
// On Windows: β check
console.log(figures.tick);
// On non-Windows OSes: βοΈ
// On Windows: β
console.log(figures.main.tick);
// On all OSes: βοΈ
console.log(figures.windows.tick);
// On all OSes: β
```
## API
### figures(string)
Returns the input with replaced fallback Unicode symbols on Windows.
All the below [figures](#figures) are attached to the main export as shown in the example above.
#### string
Type: `string`
String where the Unicode symbols will be replaced with fallback symbols depending on the OS.
### figures.main
Symbols to use when not running on Windows.
### figures.windows
Symbols to use when running on Windows.
## Figures
| Name | Non-Windows | 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 | β₯ | β₯ |
| nodejs | β¬’ | β¦ |
| 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](https://github.com/sindresorhus/log-symbols) - Colored symbols for various log levels
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-figures?utm_source=npm-figures&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
|