strict-password-generator
Generate a random password with strict requirements
Install
$ npm install strict-password-generator --save
Usage
const PasswordGenerator = default; const passwordGenerator = ; // return value is a unique randomly generated password stringlet password = passwordGenerator;
Options
Pass options object to passwordGenerator.generatePassword()
Possible special characters : ['!', '@', '#', '$', '%', '^', '*', '+', '_', '-', '=', ':', ';', '?']
Name | Type | Default Value |
---|---|---|
upperCaseAlpha | Bool | true |
lowerCaseAlpha | Bool | true |
number | Bool | true |
specialCharacter | Bool | true |
minimumLength | Int (Must be >= 4) | 8 |
maximumLength | Int | minimumLength + 4 |
exactLength | Int | none |
Examples
const PasswordGenerator = default; const passwordGenerator = ; const options = upperCaseAlpha : false lowerCaseAlpha : true number : true specialCharacter : false minimumLength : 10 maximumLength : 12 let password = passwordGenerator; console; // example string : qa5859qoz8
const PasswordGenerator = default; const passwordGenerator = ; // exactLength will always override minimumLength and maximumLengthconst options = minimumLength : 10 maximumLength : 12 exactLength : 15 let password = passwordGenerator; console; // example string : 5eT1c^n9,`35C5}