vertical-meter

1.0.0 • Public • Published

vertical-meter

npm version Build Status Build status Coverage Status

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

Use npm.

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

Package Sidebar

Install

npm i vertical-meter

Weekly Downloads

28

Version

1.0.0

License

ISC

Unpacked Size

3.53 kB

Total Files

4

Last publish

Collaborators

  • shinnn