is-pentagonal

1.0.0 • Public • Published

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

/is-pentagonal/

    Package Sidebar

    Install

    npm i is-pentagonal

    Weekly Downloads

    2

    Version

    1.0.0

    License

    ISC

    Last publish

    Collaborators

    • dsernst