1.0.0 • Published 6 years ago

solid-square v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

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