slash-bar

1.0.3 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i slash-bar

Weekly Downloads

3

Version

1.0.3

License

MIT

Unpacked Size

1.6 kB

Total Files

3

Last publish

Collaborators

  • ynot_modules