https://github.com/ghostffcode/psquare
This is a node package that checks if an input is a perfect square
https://github.com/ghostffcode/psquare
Last synced: about 1 year ago
JSON representation
This is a node package that checks if an input is a perfect square
- Host: GitHub
- URL: https://github.com/ghostffcode/psquare
- Owner: ghostffcode
- License: mit
- Created: 2016-06-01T02:07:19.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-10T17:21:55.000Z (over 9 years ago)
- Last Synced: 2024-10-18T20:48:34.407Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# psquare
This is a node package that checks if an input is a perfect square and returns true or false
## How to use
```bash
npm install --save psquare
```
include in your script as:
```javascript
var psquare = require('psquare');
```
Use as:
```javascript
// returns true or false
// pass the number as argument to the check method
psquare.check(49);
```
Example would be:
```javascript
var psquare = require('psquare');
// Check if a number is a perfect square or not, returns true or false
if (psquare.check(49)) {
console.log("Is perfect square")
}
```