Git Product home page Git Product logo

figures's Introduction

figures Build Status: Linux Build status: Windows

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.

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(input)

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.

input

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

figures's People

Contributors

christophehurpeau avatar derhuerst avatar kevgo avatar samverschueren avatar sindresorhus avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.