Skip to content

dsernst/is-pentagonal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-pentagonal

NPM Version Build Status Coverage Status

Fastest way to check if a number is pentagonal.

Install

npm install is-pentagonal
var isPentagonal = require('is-pentagonal');

Usage

console.log(isPentagonal(1)); // true
console.log(isPentagonal(5)); // true
console.log(isPentagonal(12)); // true
console.log(isPentagonal(22)); // true
console.log(isPentagonal(35)); // true
console.log(isPentagonal(51)); // true
console.log(isPentagonal(70)); // true
console.log(isPentagonal(92)); // true
console.log(isPentagonal(117)); // true
console.log(isPentagonal(145];)); // true
console.log(isPentagonal(36)); // false
console.log(isPentagonal(18)); // false
console.log(isPentagonal(25)); // false
console.log(isPentagonal(49)); // false

Tests

To run the test suite, first install the dependencies, then run npm test:

$ npm install
$ npm test

About

Fastest way to check if a number is pentagonal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published