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

passbird

v2.2.3

Published

An npm's library for easy keygen and easy password validation

Downloads

29

Readme

Passbird 🐦‍⬛

Passbird is an npm library for generating and validating passwords.

Installation

To install Passbird globally on your system, run:

npm install -g passbird

To install Passbird in an specific context, run:

npm install passbird

Usage (when installed globally)

To use Passbird, start by running:

passbird start

You will be asked to choose the type of password you want to generate:

$ passbird start
? Want to generate a default or memorable password or want to validate a password? (Use arrow keys)
❯ Default
  Memorable
  Validate

Default Password

If you choose the "Default" option, you will be asked the following questions:

? What type of password do you want to generate? Default
? How long do you want the password to be? 10
? Include uppercase letters? Yes
? Include numbers? Yes
? Include symbols? Yes

After answering these questions, Passbird will generate a random password for you, like this: :v/rz!p6SR

Memorable Password

If you choose the "Memorable" option, you will be asked the following questions:

? What type of password do you want to generate? Memorable
? Include uppercase letters? Yes
? Include numbers? Yes
? Include symbols? Yes
Please, enter the words separated by commas: Andrés, Lina

After answering these questions, Passbird will generate a memorable password for you, like this: AndrésdLina16M.. If you're not satisfied with the password, you can choose to generate a new one:

Are you satisfied with the password? (y/n) n
Please, enter the words separated by commas:

Validate

This section of the code introduces a feature that validates any given password against the Have I Been Pwned (HIBP) API.

$ passbird start
? Want to generate a default or memorable password or want to validate a password? Validate
? Insert password to validate: Loi

Warn:
Password has been exposed in previous data breaches.

Usage (when installed in an specific context)

If you want to use an specific function (default, memorable or validate password), run:

For default:

node default.js <length> <includeUppercase> <includeNumbers> <includeSymbols>

The command will be something like:

node default.js 10 true true true

If you want to import it and use it in your project:

import { generatDefaultePassword } from '../node_modules/passbird/src/index.js';

// Define arguments
let length = 10;
let includeUppercase = 'true';
let includeNumbers = 'true';
let includeSymbols = 'true';

// Call the function
let password = generatDefaultePassword(length, includeUppercase, includeNumbers, includeSymbols);

For memorable:

node memorable.js <includeUppercase> <includeNumbers> <includeSymbols>

The command will be something like:

node memorable.js true true true

Then, you will be ask for write the words you want to use.

If you want to import it and use it in your project:

import { generateMemorablePassword } from '../node_modules/passbird/src/index.js';

// Define arguments
let includeUppercase = 'true';
let includeNumbers = 'true';
let includeSymbols = 'true';

// Call the function
generateMemorablePassword(includeUppercase, includeNumbers, includeSymbols);

For validate:

node validate.js <password>

The command will be something like:

node validate.js password123

If you want to import it and use it in your project:

import { validatePassword } from '../node_modules/passbird/src/index.js';

// Define the password
let password = 'password123';

// Call the function
validatePassword(password);

Note that default.js and memorable.js return the variable "password", so you can use it in your project but validate.js returns a message if the password is breached or not.

Contributing

We welcome contributions to Passbird! If you're interested in improving this library, there are many ways you can contribute:

  • Submit bug reports and feature requests on our GitHub issues page.
  • Review and improve our documentation.
  • Review and refactor our existing code.
  • Add new features and enhancements.

To get started, please fork the Passbird repository, make your changes, and submit a pull request. We look forward to collaborating with you!

License

Passbird is licensed under the MIT License. See the LICENSE file for more details.