Skip to content

emilhaugberg/pwd-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random Password Generator

Install

$ npm install pwd-gen

Usage

const pwdGen = require('pwd-gen')
const randomPwd = pwdGen(options)

Where you can specify which type of characters you want to exclude like this:

{
  specialCharacters: Bool,
  numbers: Bool,
  charsUpper: Bool,
  chars: Bool,
  length: Int
}

CLI Usage

Usage: index [options]

Options:

  -h, --help             output usage information
  -V, --version          output the version number
  -n, --nonums           password without numbers
  -c, --nolower          password without lowercase characters
  -u, --noupper          password without uppercase characters
  -s, --nospecial        password without special characters
  -l, --length <length>  specify length of password (default is 15)

Examples:

   $ pwd-gen --length 10
   $ pwd-gen --nonums

Examples

Without numbers

$ pwd-gen --nonums
=> QPRr&I&vQsg)l%Y

Without uppercase characters

$ pwd-gen --noupper
=> cpeaom/i1$%)j+r

Without special characters

$ pwd-gen --nospecial
=> oXlEgQHMd5lV3Te