Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve readme.md #86

Merged
merged 1 commit into from
Jul 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@ $ npm install figures

## Usage

See the [source](index.js) for supported symbols.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The symbols are listed below.


```js
import figures, {replaceSymbols, mainSymbols, windowsSymbols} from 'figures';

console.log(figures.replaceSymbols('✔︎ check'));
// On non-Windows OSes: ✔︎ check
// On Windows: √ check

console.log(figures.tick);
// On non-Windows OSes: ✔︎
// On Windows: √
Expand All @@ -34,10 +28,28 @@ console.log(figures.mainSymbols.tick);

console.log(figures.windowsSymbols.tick);
// On all OSes: √

console.log(figures.replaceSymbols('✔︎ check'));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is less important, i.e. moving to the end.

// On non-Windows OSes: ✔︎ check
// On Windows: √ check
```

## API

### figures (default export)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a missing entry for the main/default export.


Type: `object`

Symbols to use on any terminal.

### mainSymbols

Symbols to use when not running on Windows.

### windowsSymbols

Symbols to use when running on Windows.

### replaceSymbols(string)

Returns the input with replaced fallback Unicode symbols on Windows.
Expand All @@ -50,14 +62,6 @@ Type: `string`

String where the Unicode symbols will be replaced with fallback symbols depending on the OS.

### mainSymbols

Symbols to use when not running on Windows.

### windowsSymbols

Symbols to use when running on Windows.


## Figures

Expand Down