0.0.6 • Published 8 years ago

square-area v0.0.6

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

square-area

NPM

Get the area of a square, given the length of one of its sides

Install

$ npm install --save square-area

Usage

const squareArea = require('square-area')

console.log(squareArea(0))
// => 0

console.log(squareArea(1))
// => 1

console.log(squareArea(7))
// => 49

console.log(squareArea(Math.PI))
// => 9.869604401089358

console.log(squareArea(-1))
// => Error: Invalid size. Side of the square must be greater than or equal to 0

License

MIT © Nicolás Quiroz

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago