Skip to content

Commit

Permalink
Move example
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Feb 25, 2024
1 parent 4b187ac commit 12c343b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ console.log(fallbackSymbols.tick);
console.log(replaceSymbols('✔︎ check'));
// On terminals with Unicode symbols: ✔︎ check
// On other terminals: √ check

console.log(replaceSymbols('✔︎ check', {useFallback: true}));
// On terminals with Unicode symbols: √︎ check
// On other terminals: √ check
```

## API
Expand Down Expand Up @@ -79,6 +75,14 @@ Whether to replace symbols with fallbacks.

This can be set to `true` to always use fallback symbols, whether the terminal has poor Unicode support or not.

```js
import {replaceSymbols} from 'figures';

console.log(replaceSymbols('✔︎ check', {useFallback: true}));
// On terminals with Unicode symbols: √︎ check
// On other terminals: √ check
```

## Figures

`Fallback` characters are only shown when they differ from the `Main` ones.
Expand Down

0 comments on commit 12c343b

Please sign in to comment.