Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

slash-bar

ynot_modules7MIT1.0.3

Create a bar of slashes to segment output

slash, bar, cli

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-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