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

@kesavandev/password-strength-checker

v2.0.1

Published

Advanced password strength checker with entropy calculation and crack time estimation

Readme

Password Strength Checker

A lightweight JavaScript library to evaluate password strength using entropy calculation, crack-time estimation, and rule-based feedback.


Installation

npm install @kesavandev/password-strength-checker

Usage

const { checkPassword } = require("@kesavandev/password-strength-checker");

const result = checkPassword("P@ssw0rd123");

console.log(result);

Example Output

{
  "entropy": 52.34,
  "strength": "Strong",
  "crackTime": "3.25 hours",
  "feedback": []
}

Features

  • Entropy-based password strength calculation

  • Crack time estimation based on brute-force attack assumptions

  • Feedback system for improving weak passwords

  • Detection of:

    • Short passwords
    • Missing character types (uppercase, lowercase, numbers, symbols)
    • Common passwords (basic list)
    • Repeated characters

How It Works

1. Charset Detection

The library identifies the types of characters used:

  • Lowercase letters
  • Uppercase letters
  • Numbers
  • Special characters

2. Entropy Calculation

Entropy is calculated using:

entropy = password_length × log2(character_set_size)

This estimates how unpredictable the password is.

3. Crack Time Estimation

The library estimates how long it would take to brute-force the password using a fixed guess rate.

Note: This is an approximation and may not reflect real-world attack scenarios.

4. Strength Classification

| Entropy Range | Strength | | ------------- | ----------- | | < 28 | Very Weak | | 28 – 35 | Weak | | 36 – 59 | Moderate | | 60 – 79 | Strong | | 80+ | Very Strong |


Feedback Messages

The library provides suggestions such as:

  • Use at least 12 characters
  • Add uppercase or lowercase letters
  • Include numbers and symbols
  • Avoid repeated characters
  • Avoid common passwords

Limitations

This library uses a simplified entropy model and basic pattern checks.

  • Does not include large password dictionaries
  • Does not detect advanced patterns (keyboard sequences, substitutions)
  • Crack-time estimates are theoretical

For advanced use cases, consider more comprehensive solutions like dedicated password strength estimators.


License

MIT