Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including vertical-meter with all npm packages installed. Try it out:

var verticalMeter = require("vertical-meter")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

vertical-meter v1.0.0

Generate a dotted vertical bar whose height depends on the given value

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

argumentreturn
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

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free