Socket
Book a DemoInstallSign in
Socket

solid-square

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solid-square

Render a solid square of varying sizes and colors

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

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

Keywords

square

FAQs

Package last updated on 21 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts