drawfigures v1.0.2
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, '#');
// #######
// #######
// #######
// #######
// #######
// #######
// #######