1.0.3 • Published 3 years ago

slash-bar v1.0.3

Weekly downloads
142
License
MIT
Repository
-
Last release
3 years ago

Overview

Slashbar allows you to easily print long bars comprised of forward slashes and backslashes. This can be useful for quickly formatting or breaking up your output.

Installation

$ npm install slash-bar

Usage

const slashbar = require('slash-bar');

slashbar();
/*
Output: //////////////////////////////
*/

slashbar(30);
/*
Output: //////////////////////////////
The first parameter controls the length of the bar (Default: 20)
*/

slashbar(30, false);
/*
Output: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
The second parameter controls whether the bar will use forward slashes
(false for backslash) (Default: true)
*/

slashbar(30, true, true);
/*
Output: /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
The third parameter controls whether the bar uses an alternating pattern
(true for alternation) (Default: false)
*/

License

MIT

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago