print-shape

1.0.1 • Public • Published

print-shape

print out a variety of shapes from your console

Usage

// index.js
const { triangle, square, rhombus } = require('print-shape')

triangle(6)
square(6)
rhombus(6)

execute with

# node index.js

in terminal

     /\
    /  \
   /    \
  /      \
 /        \
/----------\
|------|
|      |
|      |
|      |
|      |
|------|
  /-\
 /   \
/     \
\     /
 \   /
  \-/

API

.triangle(num: number): null

no return just log the shape in terminal

.square(num: number(>1)): null

no return just log the shape in terminal

.rhombus(num: number(even)): null

no return just log the shape in terminal

License

MIT © Song Wang

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i print-shape

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • songwang