1.0.2 • Published 1 year ago

drawfigures v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

drawFigures

This package is designed for drawing geometrical figures. It has 4 functions so far.

How to install

To install this package, run the command

npm install drawfigures

Then use a variable to require this package as follows (you can choose any name of the variable you like):

const drawFigures = require("drawfigures");

Then enjoy this package. You can read more about its functionality below =)

Functionality

drawTriangle(size) function will draw you a triangle. Input the size you want into the parameter of this function. It must be a positive number bigger than 1.

drawFigures.drawTriangle(4);
// *
// **
// ***
// ****

drawTriangleSym(size, symbol) function will also draw you a triangle. Here you can also choose the symbol you like to be used in your drawing.

drawFigures.drawTriangleSym(5, "@");
// @
// @@
// @@@
// @@@@
// @@@@@

drawSquare(size) function will draw you a square. Input the size you want into the parameter of this function. It must be a positive number bigger than 1.

drawFigures.drawSquare(4);
// ****
// ****
// ****
// ****

drawSquareSym(size, symbol) function will also draw you a square. Here you can also choose the symbol you like to be used in your drawing.

drawFigures.drawSquareSym(7, '#');
// #######
// #######
// #######
// #######
// #######
// #######
// #######
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago