solid-square

1.0.0 • Public • Published

solid-square Build Status codecov

Render solid squares of varying sizes and colors

Install

$ npm install solid-square

Usage

const solidSquare = require('solid-square');
 
console.log(solidSquare(10));
// ████████████████████
// ████████████████████
// ████████████████████
// ████████████████████
// ████████████████████
// ████████████████████
// ████████████████████
// ████████████████████
// ████████████████████
// ████████████████████
const solidSquare = require('solid-square');
 
console.log(
  solidSquare(10, {
    character: '',
    color: 'yellow',
    scale: .5
  });
);
// ☺☺☺☺☺☺☺☺☺☺
// ☺☺☺☺☺☺☺☺☺☺
// ☺☺☺☺☺☺☺☺☺☺
// ☺☺☺☺☺☺☺☺☺☺
// ☺☺☺☺☺☺☺☺☺☺

API

solidSquare(size, [options])

size

Type: number

The size of your square.

options

Type: Object

character

Type: string
Default: ██

The character to use for each cell.

color

Type: string
Default: undefined

The character to use for each cell.

scale

Type: string
Default: undefined

Y-axis size multiplier.

License

MIT © Chris Vogt

Dependents (0)

Package Sidebar

Install

npm i solid-square

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

4.54 kB

Total Files

4

Last publish

Collaborators

  • chrisvogt