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

password-magic

v1.0.0

Published

Generate ultrastrong user passwords and auth tokens

Downloads

6

Readme

Build Status

password-magic

Generate ultrastrong user passwords and auth tokens

yarn add password-magic --save

Features

  • Full asynchronous operation
  • Generate Random User Passwords
  • Random Number Sequences of arbitrary length
  • Random Pin Numbers (4 Digits)
  • Remarkable Human Passwords (nato+greek alphabet)
  • Human passwords/tokens only uses easy readable chars (l and i are avoided)
  • Alphnumerical Tokens
  • Node.js crypto API is used to generate uniformly-distributed random numbers

API

  • numbers - Random Number Sequences of arbitrary length
  • pin - Creates a 4 digit numerical code
  • internet - Strong passphrases especially used for web services/accounts/wifi
  • server - Ultrastrong passphrases especially used for servers
  • humanShort - Remarkable passwords including greek+nato alphabet
  • token - Alphnumerical Standard Tokens

numbers

Description: Random Number Sequences of arbitrary length

Syntax: sequence:string = numbers([length:int = 8])

Output: 9071248216498

Arguments:

  • length:int - length of the generated sequence

Example:

const _pwMagic = require('./password-magic');

for (let i=0;i<10;i++){
    console.log('Numbers', await _pwMagic.numbers());
}

pin

Description: Creates a 4 digit numerical code

Syntax: sequence:string = pin()

Output: 0981

internet

Description: Strong passphrases especially used for web services/accounts or wifi

Syntax: sequence:string = internet([length:int = 22], [shuffle:boolean = false])

Output: brGK98]~hkhyNE79_?297

Arguments:

  • length:int - length of the generated sequence
  • shuffle:boolean - flag to enable character position shuffle (random positions)

Example:

const pw1 = await _pwMagic.internet();
// brGK98]~hkhyNE79_?297

const pw2 = await _pwMagic.internet(50, true);
// 62p6u4dS934HssJ9*8BMa!(NN}q}384Udoc2F!)8%§5!D7psYL

server

Description: Ultrastrong passphrases especially used for servers

Syntax: sequence:string = server([length:int = 20])

Output: v~8)yyk§HMKU§HBg&%#w

Arguments:

  • length:int - length of the generated sequence

Example:

const pw1 = await _pwMagic.server(25);
// v~8)yyk§HMKU§HBg&%#wyDS9F

humanShort

Description: Remarkable passphrases especially used for web services/accounts with multifactor auth

Syntax: sequence:string = humanShort()

Output: foxtrot5SIERRA,four]03pm

Example:

const pw1 = await _pwMagic.humanShort();
// foxtrot5SIERRA,four]03pm

token

Description: Alphnumerical Standard Tokens

Syntax: sequence:string = token([length:int = 20])

Output: l4J4rK9v62MUGBstbgh0XyQUQ

Arguments:

  • length:int - length of the generated sequence

Example:

const pw1 = await _pwMagic.token(50);
// Q49hIVylOKI1ixUe5FLliIsUEbASHWXjFRBEBPs6zcoog0JFnezOvS6HJWahQhca

Any Questions ? Report a Bug ? Enhancements ?

Please open a new issue on GitHub

License

password-magic is OpenSource and licensed under the Terms of The MIT License