npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

validity-checker

v2.2.4

Published

Check the validity of various numbers

Readme

validity-checker

npm

Various types of functions to check the validity of various types of numbers and addresses.

Installation

Install the library with npm install validity-checker

Usage

var validityChecker = require('validity-checker');

1. isEmail()

var result = validityChecker.isEmail("[email protected]");

returns true or false

2. isMobileNumber()

var result = validityChecker.isMobileNumber("9999999999");

returns true or false

3. isBetweenDoubleQuotes()

var result = validityChecker(isBetweenDoubleQuotes('Hello.. "Everybody"',"Everybody"));

/* returns true 

checks according to the case sensitivity

*/

4. isEmoji()

var result = validityChecker(isEmoji("🙃🙃"));
/* returns true */

Can be able to check following patterns

  • (123) 456-7890
  • (123)456-7890
  • 123-456-7890
  • 123.456.7890
  • 1234567890
  • +31636363634
  • 075-63546725

Some other other validity-checkers are:

validity-checkers | Description -----------------------------------|----------------- isVisaCard() | Returns true if the string is in the visa card format isMasterCard() | Returns true if the string is in the master card format isAmericanExpressCard() | Returns true if the string is in the american express card format isDinersClubCard() | Returns true if the string is in the Diners Club card format isDiscoverCard() | Returns true if the string is in the Discover Card format isJCBCard() | Returns true if the string is in the JCB Card format isCardNumber() | Returns true if the string is in any of the above card formats isStrongPassword() | Returns true if the password is strong isMediumStrengthPassword() | Returns true if the password is neither too strong nor too weak isPortNumber() | Returns true if the string is valid Port number (except 0) isMacAddress() | Returns true if the string is a valid MAC Address isValidUrl() | Returns true if the string is a valid url (including ftp, https, smtp) isHexColorCode() | Returns true if the string is a valid hex color code isInternationalPassportNumber()| Returns true if the string is a valid international passport number isIMEINumber() | Returns true if the number is a valid IMEI number isUUIDv4() | Returns true if the entered string is uuid v4 isUSSD() | Returns true if the entered string is a valid USSD Code isBrainFuckCode() | Returns true if the entered string is a valid BrainFuck code isMorseCode() | Returns true if the entered string is a valid Morse Code or not isIPV4() | Returns true if the entered string is a valid IPv4 isIPV6() | Returns true if the entered string is a valid IPv4 isBetweenDoubleQuotes() | Returns true if the entered string is contained in between double quotes isEmoji() | Returns true if the entered string is an Emoji

Note

The above mentioned functions validating only the format of the card numbers not the real card numbers.