File tree 1 file changed +18
-14
lines changed
1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,9 @@ $ npm install figures
16
16
17
17
## Usage
18
18
19
- See the [ source] ( index.js ) for supported symbols.
20
-
21
19
``` js
22
20
import figures , {replaceSymbols , mainSymbols , windowsSymbols } from ' figures' ;
23
21
24
- console .log (figures .replaceSymbols (' ✔︎ check' ));
25
- // On non-Windows OSes: ✔︎ check
26
- // On Windows: √ check
27
-
28
22
console .log (figures .tick );
29
23
// On non-Windows OSes: ✔︎
30
24
// On Windows: √
@@ -34,10 +28,28 @@ console.log(figures.mainSymbols.tick);
34
28
35
29
console .log (figures .windowsSymbols .tick );
36
30
// On all OSes: √
31
+
32
+ console .log (figures .replaceSymbols (' ✔︎ check' ));
33
+ // On non-Windows OSes: ✔︎ check
34
+ // On Windows: √ check
37
35
```
38
36
39
37
## API
40
38
39
+ ### figures (default export)
40
+
41
+ Type: ` object `
42
+
43
+ Symbols to use on any terminal.
44
+
45
+ ### mainSymbols
46
+
47
+ Symbols to use when not running on Windows.
48
+
49
+ ### windowsSymbols
50
+
51
+ Symbols to use when running on Windows.
52
+
41
53
### replaceSymbols(string)
42
54
43
55
Returns the input with replaced fallback Unicode symbols on Windows.
@@ -50,14 +62,6 @@ Type: `string`
50
62
51
63
String where the Unicode symbols will be replaced with fallback symbols depending on the OS.
52
64
53
- ### mainSymbols
54
-
55
- Symbols to use when not running on Windows.
56
-
57
- ### windowsSymbols
58
-
59
- Symbols to use when running on Windows.
60
-
61
65
62
66
## Figures
63
67
You can’t perform that action at this time.
0 commit comments