JSPM

drawfigures

1.0.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 2
    • Score
      100M100P100Q9348F
    • License ISC

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

    Package Exports

    • drawfigures
    • drawfigures/drawfigures.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (drawfigures) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    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, '#');
    // #######
    // #######
    // #######
    // #######
    // #######
    // #######
    // #######