3.2.1 • Published 3 years ago

@nyadam/figures v3.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

figures Build Status

Unicode symbols with Windows CMD fallbacks

npm.io

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 non-Windows OSes:  ✔︎ check
// On Windows:           √ check

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

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

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

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.main

Symbols to use when not running on Windows.

figures.windows

Symbols to use when running on Windows.

Figures

NameNon-WindowsWindows
tick
cross×
star*
square
squareSmall
squareSmallFilled
play
circle( )
circleFilled(*)
circleDotted( )
circleDouble( )
circleCircle(○)
circleCross(×)
circlePipe(│)
circleQuestionMark?⃝(?)
bullet*
dot.
line
ellipsis...
pointer>
pointerSmall»
infoi
warning
hamburger
smiley
mustache┌─┐
heart
nodejs
arrowUp
arrowDown
arrowLeft
arrowRight
radioOn(*)
radioOff( )
checkboxOn×
checkboxOff
checkboxCircleOn(×)
checkboxCircleOff( )
questionMarkPrefix?⃝
oneHalf½1/2
oneThird1/3
oneQuarter¼1/4
oneFifth1/5
oneSixth1/6
oneSeventh1/7
oneEighth1/8
oneNinth1/9
oneTenth1/10
twoThirds2/3
twoFifths2/5
threeQuarters¾3/4
threeFifths3/5
threeEighths3/8
fourFifths4/5
fiveSixths5/6
fiveEighths5/8
sevenEighths7/8

Related