figures
    Overview
    Documentation
    Tutorials
    Chat
    Insights
    Code
    Dependencies
    Contributors
    Jobs

figures

Unicode symbols with Windows CMD fallbacks

3.0.0  •  Updated 1 years ago  •  by Sindre Sorhus  •  MIT License

Unicode symbols with Windows CMD fallbacks

and more…

Windows CMD only supports a limited character set.

Install

$ npm install figures

Usage

See the source for supported symbols.

const figures = require('figures');

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

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

API

figures(string)

Returns the input with replaced fallback Unicode symbols on Windows.

All the below figures are attached to the main 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

Name Real OSes Windows
tick
cross ×
star *
square
squareSmall [ ]
squareSmallFilled [█]
play
circle ( )
circleFilled (*)
circleDotted ( )
circleDouble ( )
circleCircle (○)
circleCross (×)
circlePipe (│)
circleQuestionMark ?⃝ (?)
bullet *
dot .
line
ellipsis
pointer >
pointerSmall »
info i
warning
hamburger
smiley
mustache ┌─┐
heart
arrowUp
arrowDown
arrowLeft
arrowRight
radioOn (*)
radioOff ( )
checkboxOn [×]
checkboxOff [ ]
checkboxCircleOn (×)
checkboxCircleOff ( )
questionMarkPrefix ?⃝
oneHalf ½ 1/2
oneThird 1/3
oneQuarter ¼ 1/4
oneFifth 1/5
oneSixth 1/6
oneSeventh 1/7
oneEighth 1/8
oneNinth 1/9
oneTenth 1/10
twoThirds 2/3
twoFifths 2/5
threeQuarters ¾ 3/4
threeFifths 3/5
threeEighths 3/8
fourFifths 4/5
fiveSixths 5/6
fiveEighths 5/8
sevenEighths 7/8

Related

License

MIT © Sindre Sorhus

Popularity

Maintenance

Development

Last ver 1 year ago
Created 6 years ago
Last commit 3 months ago
1 month between commits

Technology

Node version: 8.15.0
10.8K unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

11 contributors
Sindre Sorhus
Maintainer, 52 commits, 13 merges
Sam Verschueren
Maintainer, 4 commits, 4 PRs
Jannis R
2 commits, 2 PRs
Richie Bendall
2 commits, 3 PRs
Kevin Goslar
1 commits, 1 PRs
Works at Originate
Christophe Hurpeau
1 commits, 1 PRs
Works at ornikar

Tags

unicode
cli
cmd
command-line
characters
symbol
symbols
figure
figures
fallback
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
FacebookTwitterLinkedIn
© 2020 Devstore, Inc.