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

@investorphem/validator-tools

v1.0.3

Published

Lightweight JS validation library for emails, phone numbers, URLs, and strong passwords.

Readme

@investorphem/validator-tools

npm version npm downloads License Build Status JavaScript Style Guide Contributors


🚀 Description

@investorphem/validator-tools is a lightweight JavaScript library for common validation tasks. It provides simple, fast, and secure functions to validate emails, phone numbers, URLs, and strong passwords.

✨ Features

  • 📧 Validate emails with isEmail
  • 📱 Validate international phone numbers with isPhoneNumber
  • 🔗 Check URLs with isUrl
  • 🔐 Enforce strong passwords with isStrongPassword
  • 🛡️ Type-Safe: Automatically catches null, undefined, or non-string inputs without crashing.
  • Modern ESM: Native ES Module support (import/export)
  • 🍃 Zero dependencies (ultra-lightweight)
  • 🤖 Fully automated GitHub Actions publishing workflow

📦 Installation

npm install @investorphem/validator-tools

or via yarn:

yarn add @investorphem/validator-tools

🧠 Usage (ES Modules)

Since version 1.0.2, this package uses standard ES Modules.

import { isEmail, isPhoneNumber, isUrl, isStrongPassword } from '@investorphem/validator-tools';

console.log(isEmail('[email protected]')); // true
console.log(isPhoneNumber('+12345678901')); // true
console.log(isUrl('[https://google.com](https://google.com)')); // true
console.log(isStrongPassword('Passw0rd!')); // true

// Safely handles invalid types without throwing regex errors
console.log(isEmail(null)); // false

📚 API

isEmail(str)

Checks if a string is a valid email format.

Parameters:

  • str (string) – Email string to validate

Returns:

  • (boolean) – True if valid email

isPhoneNumber(str)

Checks if a string is a valid international phone number (allows optional + and requires 7-15 digits).

Parameters:

  • str (string) – Phone number string

Returns:

  • (boolean) – True if valid phone number

isUrl(str)

Checks if a string is a properly formatted URL.

Parameters:

  • str (string) – URL string

Returns:

  • (boolean) – True if valid URL

isStrongPassword(str)

Checks if a string meets strong password criteria:

  • Minimum 8 characters
  • At least 1 lowercase letter
  • At least 1 uppercase letter
  • At least 1 number
  • At least 1 special character

Parameters:

  • str (string) – Password string

Returns:

  • (boolean) – True if strong password

⚙️ Automated Releases

This project uses an automated release script. To publish a new version:

  1. Commit your changes: git commit -m "update validations"
  2. Run the release command: npm run release

This will automatically bump the patch version, create a git tag, and push to GitHub, triggering the automated NPM publish action.


🛠️ Contributing

Contributions are welcome! Please fork the repo, make improvements, and submit a pull request. Ensure code follows StandardJS style.

📄 License

This project is licensed under the MIT License.

🏷️ Badges Explained

  • npm version: Current package version on npm
  • npm downloads: Total downloads from npm
  • License: License type
  • Build Status: GitHub Actions workflow status
  • JavaScript Style Guide: Code style standard
  • Contributors: Number of contributors

Maintained by Oluwafemi Olagoke