Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move example
Browse files Browse the repository at this point in the history
ehmicky committed Feb 25, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
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
@@ -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
@@ -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.

0 comments on commit 12c343b

Please sign in to comment.