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

@bhavana_lagadapati/password_utilities

v1.0.2

Published

password utilities provides various functions for password generation,validation and security

Readme

Here's the README.md formatted based on your provided code:

# Password Utilities Module

The *Password Utilities Module* is a lightweight and reusable library designed to simplify password management in JavaScript projects. It provides various functions for password generation, validation, and security, making it highly useful for applications, including MERN stack projects.

---

## Features

1. *Password Generation*: Create random passwords with customizable options for letters, numbers, and symbols.
2. *Strength Validation*: Check if a password meets specified strength criteria (e.g., length, uppercase, numbers, symbols).
3. *Password Hashing*: Securely hash passwords using the bcrypt library.
4. *Hash Verification*: Verify if a plain text password matches a hashed password.
5. *Common Password Check*: Check if a password is in a list of commonly used passwords for enhanced security.

---

## Installation

To use the *Password Utilities Module* in your project, install it via npm:

```bash
npm install @bhavana_lagadapati/password-utilities

Usage

Importing the Module

ES Modules:

import PasswordUtils from '@bhavana_lagadapati/password-utilities';

CommonJS:

const PasswordUtils = require('password-utilities');

Available Functions

1. generate(length, options)

Generates a random password with customizable options for letters, numbers, and symbols.

Parameters:

  • length: The desired length of the password (default: 12).
  • options: An object with boolean properties (letters, numbers, symbols) to specify character types (default: { letters: true, numbers: true, symbols: true }).

Example:

const password = PasswordUtils.generate(16, { letters: true, numbers: true, symbols: true });
console.log(password); // Output: Randomly generated password

2. isStrong(password)

Checks if a password meets strength criteria:

  • At least 8 characters long
  • Includes uppercase letters, lowercase letters, numbers, and symbols

Parameters:

  • password: The password to validate.

Example:

console.log(PasswordUtils.isStrong("My$ecureP@ss123")); // Output: true

3. hash(password)

Hashes a password securely using the bcrypt library.

Parameters:

  • password: The plain text password to hash.

Example:

const hashedPassword = PasswordUtils.hash("My$ecureP@ss123");
console.log(hashedPassword); // Output: A hashed password

4. verifyHash(password, hash)

Verifies if a plain text password matches its hashed version.

Parameters:

  • password: The plain text password.
  • hash: The hashed password to verify against.

Example:

const isValid = PasswordUtils.verifyHash("My$ecureP@ss123", hashedPassword);
console.log(isValid); // Output: true or false

5. isCommonPassword(password)

Checks if a password is among a list of commonly used passwords for improved security.

Parameters:

  • password: The password to check.

Example:

console.log(PasswordUtils.isCommonPassword("password123")); // Output: true

Use Cases

1. User Registration

  • Use Case: Generate secure default passwords for new users or validate the strength of user-created passwords.
  • Example:
    const isStrong = PasswordUtils.isStrong("My$ecureP@ss123");
    if (!isStrong) console.log("Password must be stronger!");

2. Authentication Systems

  • Use Case: Securely store and validate user passwords.
  • Example:
    const hashedPassword = PasswordUtils.hash("userPassword");
    const isValid = PasswordUtils.verifyHash("userPassword", hashedPassword);
    console.log(isValid); // Output: true

3. Security Checks

  • Use Case: Prevent users from using commonly used passwords during registration.
  • Example:
    if (PasswordUtils.isCommonPassword("123456")) {
      console.log("Choose a more secure password!");
    }

4. Admin Tools

  • Use Case: Generate strong passwords for admin accounts.
  • Example:
    const adminPassword = PasswordUtils.generate(20, { letters: true, numbers: true, symbols: true });
    console.log("Admin Password:", adminPassword);

5. E-Commerce

  • Use Case: Validate customer passwords during registration or login to meet strength criteria.
  • Example:
    const isStrong = PasswordUtils.isStrong("Shop@Secure123");
    if (!isStrong) console.log("Password must include symbols and numbers!");


This `README.md` gives a detailed overview of the module, its features, installation, usage examples, and potential use cases. Let me know if you need any further modifications!