Socket
Socket
Sign inDemoInstall

figures

Package Overview
Dependencies
0
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    figures

Unicode symbols with Windows CMD fallbacks


Version published
Weekly downloads
29M
decreased by-10.49%
Maintainers
1
Install size
3.75 kB
Created
Weekly downloads
 

Package description

What is figures?

The figures npm package provides a set of unicode symbols with fallbacks to ASCII characters for better compatibility across different platforms. It allows developers to enhance the visual appeal and readability of their console output without worrying about cross-platform issues.

What are figures's main functionalities?

Cross-platform symbols

This feature allows the use of symbols like ticks and crosses, with automatic fallbacks to simpler ASCII characters on platforms that do not support the more complex unicode symbols. The code sample demonstrates how to use the tick and cross symbols.

"use strict";\nconst figures = require('figures');\nconsole.log(figures.tick, figures.cross);

Customizable symbol fallbacks

Developers can customize the fallbacks for symbols, providing an alternative character for environments that do not support the default unicode symbol. This code sample shows how to replace the default tick symbol with a custom character.

"use strict";\nconst figures = require('figures');\nfigures.replace({ tick: '√' });\nconsole.log(figures.tick);

Other packages similar to figures

Readme

Source

figures Build Status

Unicode symbols with Windows CMD fallbacks

and more...

Windows CMD only supports a limited character set.

Install

$ npm install --save figures

Usage

See the source for supported symbols.

var figures = require('figures');

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

License

MIT © Sindre Sorhus

Keywords

FAQs

Last updated on 16 Nov 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc