Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

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

install

npm i vertical-meter

Downloadsweekly downloads

2,233

version

1.0.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability