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 🙏

© 2025 – Pkg Stats / Ryan Hefner

password-generate

v1.1.1

Published

Password generator

Readme

password-generate

Password generators.

Based on actual use cases encountered in the wild.

  • mixed: (alpha) + (num) + (symbol)
  • alphanum: some systems don't allow symbols
  • num: primarily those intended for phone usage

Usage

Naked

lib/* mode length
lib/* mode
lib/* length
lib/*

mode = m[ixed]|a[lphanum]|n[um] ; default mixed
length = (integer >= 3) ; default = 12

npm

npm install password-generate
let PasswordGenerate = require('password-generate')
console.log(PasswordGenerate.generate(mode, length))
console.log(PasswordGenerate.generate(mode))
console.log(PasswordGenerate.generate(length))
console.log(PasswordGenerate.generate())

gem

gem install password_generate
require 'password_generate'
p PasswordGenerate.generate mode, length
p PasswordGenerate.generate mode
p PasswordGenerate.generate length
p PasswordGenerate.generate

composer

composer require password-generate
use password_generate;
echo password_generate\PasswordGenerate::generate($mode, $length);
echo password_generate\PasswordGenerate::generate($mode);
echo password_generate\PasswordGenerate::generate($length);
echo password_generate\PasswordGenerate::generate();

bash

./password-generate.sh mode length
./password-generate.sh mode
./password-generate.sh length
./password-generate.sh

perl

./password-generate.pl mode length
./password-generate.pl mode
./password-generate.pl length
./password-generate.pl

Notes

Symbol

Only using the underscore _.

Some don't allow fancier symbols, but the underscore seems accepted everywhere.

Alpha

Assuming both uppercase and lowercase allowed.

The only contrary case I have seen is banks, which uses case-insensitive passwords - but then it doesn't disallow inputting both upper- and lower- case either.

Num

Ever-present.

I haven't seen a system that disallow numeric inputs yet.

First character

Is always an alpha.

Systems have various rules disallowing what is or is not allowed, but the alpha seems accepted everywhere.