Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Mar 29, 2024 via pnpm

figures 3.2.0

Unicode symbols with Windows CMD fallbacks
Package summary
Share
0
issues
1
license
2
MIT
Package created
10 Jul 2014
Version published
16 Feb 2020
Maintainers
1
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
escape-string-regexp@1.0.5
figures@3.2.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
ⓘ This is a list of figures 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
escape-string-regexp1.0.51.54 kBMIT
prod

Visualizations

Frequently Asked Questions

What does figures do?

The "figures" npm package enables the usage of Unicode symbols with fallbacks for older terminals. This is achieved by providing a comprehensive list of main figures and their fallback alternatives, which prove useful for terminals with a limited character set like the Windows Console Host (CMD).

How do you use figures?

To utilize "figures", you first need to install the package by using the npm install command: npm install figures. Once done, you can now import and make use of the various features provided by the package. The four primary exports are: figures (default export), mainSymbols, fallbackSymbols, and replaceSymbols function.

Here's basic code usage for all the primary exports:

import figures, {replaceSymbols, mainSymbols, fallbackSymbols} from 'figures';

console.log(figures.tick);
// Output will be "✔︎" on Unicode terminals, and "√" on other terminals

console.log(figures.mainSymbols.tick);
// Output will be "✔︎" on all terminals

console.log(figures.fallbackSymbols.tick);
// Output will be "√" on all terminals

console.log(figures.replaceSymbols('✔︎ check'));
// Output will be "✔︎ check" on Unicode terminals, and "√ check" on other terminals

The replaceSymbols function is used to replace Unicode symbols in a string according to the terminal's Unicode support.

Where are the figures docs?

The entire documentation for "figures", including information about all the symbols it supports, can be found in the readme content of the package's GitHub repository. Furthermore, for a comprehensive list of cross-platform terminal characters, you can refer to this resource.