Password generator function is used to generate a random password.
npm install unique-password-generatorsh
Syntax: getNewPassword();
Return Result: f%@2PC@Db76k
`
`sh
Syntax: getNewPassword(lowerCase, upperCase, number, specialCharacters);
Example:
getNewPassword(2, 4, 3, 7);
Return Result: F8oI$$1_M@u1H$^%
`
- Passed arguments will define how many characters needs to be included in password.
`sh
Syntax: getNewPassword(lowerCase, upperCase, number, specialCharacters);
Example 1:
getNewPassword(10);
Return Result: ctihhbpseg
Example 2:
getNewPassword(2, 4);
Return Result: CqLbCK
Example 3:
getNewPassword(2, 4, 0, 5);
Return Result: )B{dDJ#fB~>
`
- Sum of passed arguments will define the length of the generated password.
`sh
Syntax: getNewPassword(lowerCase, upperCase, number, specialCharacters);
// Length will be 6 for below example
Example: getNewPassword(1, 0, 2, 3);
Return Result: 24%_e{
``