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 🙏

© 2024 – Pkg Stats / Ryan Hefner

secure-pass-generator

v1.1.1

Published

Secure-pass-generator is a powerful and easy-to-use JavaScript library that generates secure passwords with customizable options. With its intuitive interface, you can quickly create complex passwords that meet your security needs. Whether you're a develo

Downloads

4

Readme

secure-pass-generator

A simple, customizable password generator for Node.js

[![NPM Version][npm-image]][npm-url] [![License][license-image]][license-url]

Installation

npm install secure-pass-generator 

Usage

Here is an example of how to use Secure-pass-generator:



const securePassGenerator = require('secure-pass-generator');


// Generate a random password with default settings
const password = securePassGenerator.generate();


console.log(password); // outputs a secure password


// Generate a password with custom settings
const customPassword = securePassGenerator.generate({
  length: 16,
  numbers: true,
  symbols: true,
  uppercase: true,
  excludeSimilarCharacters: true
});


console.log(customPassword); // outputs a customized secure password

Options

Secure-pass-generator provides several customizable options to generate passwords that meet your specific needs:

length (number): The length of the password (default is 12). numbers (boolean): Whether to include numbers in the password (default is true). symbols (boolean): Whether to include symbols in the password (default is true). uppercase (boolean): Whether to include uppercase letters in the password (default is true). excludeSimilarCharacters (boolean): Whether to exclude similar characters (e.g. i, l, 1, L, o, 0) to avoid confusion (default is true).

Password Strength Indicator

secure-pass-generator now includes a password strength indicator to help you determine the strength of your generated password. The function checkPasswordStrength takes a password as input and returns a string indicating the strength of the password. Here are the possible output strings:

Weak: The password is weak. It must contain at least one lowercase letter, one digit, and have a minimum length of 6. Medium: The password is medium strength. It must contain at least one lowercase letter, one uppercase letter, one digit, and have a minimum length of 8. Strong: The password is strong. It must contain at least one lowercase letter, one uppercase letter, one digit, one special character, and have a minimum length of 12. Here's an example of how to use checkPasswordStrength:

const { checkPasswordStrength } = require('secure-pass-generator');

const password = 'P@ssw0rd!123';
const strength = checkPasswordStrength(password);
console.log(strength);

This will output:

Strong: Password meets all criteria for a strong password.

License

Secure-pass-generator is licensed under the MIT License. See LICENSE for more information.

Contributing

Contributions are welcome! If you would like to contribute to this project, please read the CONTRIBUTING file for more information.

Issues

If you find a bug or have a feature request, please create an issue on the issue tracker.

Credits

Secure-pass-generator is developed and maintained byRifatur Rana. Thank you to all our contributors!

Support

If you need help or have questions about Secure-pass-generator, please contact me at [email protected].