Socket
Socket
Sign inDemoInstall

is-pandigital

Package Overview
Dependencies
3
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    is-pandigital

Test if a number is pandigital (made up of the digits 1-9, once each)


Version published
Weekly downloads
1
Maintainers
1
Install size
831 kB
Created
Weekly downloads
 

Readme

Source

is-pandigital

NPM Version Build Status Coverage Status

Test if a number is pandigital: made up of the digits 1-9, once each

Install

$ npm install is-pandigital
var isPandigital = require('is-pandigital');

Usage

console.log(isPandigital(192384576)); // true
console.log(isPandigital(918273645)); // true
console.log(isPandigital(9136485234)); // false
console.log(isPandigital(9183645)); // false

Optionally, pass in a second number to specify a base (defaults to 9):

console.log(isPandigital(1234, 4)); // true
console.log(isPandigital(425631, 6)); // true
console.log(isPandigital(918273645, 2)); // false

Tests

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

$ npm install
$ npm test

To test code coverage:

$ npm run cover

Keywords

FAQs

Last updated on 04 Sep 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc