<commit_before># figures

> Unicode symbols with Windows CMD fallbacks

[![](screenshot.png)](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
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:           √

console.log(figures.mainSymbols.tick);
// On all OSes:  ✔︎

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

## API

### replaceSymbols(string)

Returns the input with replaced fallback Unicode symbols on Windows.

All the below [figures](#figures) are attached to the default 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.

### mainSymbols

Symbols to use when not running on Windows.

### windowsSymbols

Symbols to use when running on Windows.


## Figures

`Windows` characters are only shown when they differ from the `Main` ones.

| Name                                        | Main | Windows |
| ------------------------------------------- | :--: | :-----: |
| tick                                        | `✔`  |   `√`   |
| info                                        | `ℹ`  |   `i`   |
| warning                                     | `⚠`  |   `‼`   |<commit_msg>Improve readme.md (#86)<commit_after># figures

> Unicode symbols with Windows CMD fallbacks

[![](screenshot.png)](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

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

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

console.log(figures.mainSymbols.tick);
// On all OSes:  ✔︎

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

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

## API

### figures (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.

All the below [figures](#figures) are attached to the default 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

`Windows` characters are only shown when they differ from the `Main` ones.

| Name                                        | Main | Windows |
| ------------------------------------------- | :--: | :-----: |
| tick                                        | `✔`  |   `√`   |
| info                                        | `ℹ`  |   `i`   |
| warning                                     | `⚠`  |   `‼`   |
{'fraction_non_alphanumeric': 0.15621193666260658, 'fraction_numerical': 0.00243605359317905, 'mean_word_length': 2.1800580832526624, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 17, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2577217', 'n_tokens_mistral': 992, 'n_tokens_neox': 974, 'n_words': 317}