Commented out special character generation in passwordGenerator.js

This commit is contained in:
Douglas Barone 2024-01-29 13:26:28 -04:00
parent 15b8d248a8
commit 800516c025

View File

@ -5,7 +5,7 @@ export function passwordGenerator(length = 8) {
const lowerCaseLetters = 'abcdefghijklmnopqrstuvwxyz'
const upperCaseLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
const numbers = '0123456789'
const specialCharacters = '!@#$%&*()[]{}/'
// const specialCharacters = '!@#$%&*()[]{}/'
// Initialize character set
let characterSet = ''
@ -33,11 +33,11 @@ export function passwordGenerator(length = 8) {
password += numbers.charAt(Math.floor(Math.random() * numbers.length))
// Add a special character to the character set
characterSet += specialCharacters
// characterSet += specialCharacters
// Pick a random special character and add it to the password
password += specialCharacters.charAt(
Math.floor(Math.random() * specialCharacters.length)
)
// password += specialCharacters.charAt(
// Math.floor(Math.random() * specialCharacters.length)
// )
// Add random characters to the password until it reaches the desired length
for (let i = 4; i < length; i++) {