vertical-meter
v1.0.0
Published
Generate a dotted vertical bar whose height depends on the given value
Downloads
102
Maintainers
Readme
vertical-meter
Generate a dotted vertical bar whose height depends on the given value
const verticalMeter = require('vertical-meter');
console.log(
verticalMeter(0),
verticalMeter(0.25),
verticalMeter(0.5),
verticalMeter(0.75),
verticalMeter(1)
);
⠀ ⣀ ⣤ ⣶ ⣿
Installation
npm install vertical-meter
API
const verticalMeter = require('vertical-meter');
verticalMeter(value)
value: number
(0
..1
)
Return: string
| argument | return |
|:-----------------------|:-------------|
| 0
<= x < 1/8
| ' '
|
| 1/8
<= x < 3/8
| '⣀'
|
| 3/8
<= x < 5/8
| '⣤'
|
| 5/8
<= x < 7/8
| '⣶'
|
| 7/8
<= x <= 1
| '⣿'
|
License
ISC License © 2018 Shinnosuke Watanabe