slash-bar
v1.0.3
Published
Create a bar of slashes to segment output
Readme
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-barUsage
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)
*/