From 82712a9c3fd632428bdf33cba3e6f6530e2be2e0 Mon Sep 17 00:00:00 2001 From: Niall Date: Wed, 25 Sep 2024 18:38:55 +0000 Subject: [PATCH] removing spacing --- src/core/operations/GeneratePassword.mjs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/core/operations/GeneratePassword.mjs b/src/core/operations/GeneratePassword.mjs index 0ad034b5b6..6e3f361e22 100644 --- a/src/core/operations/GeneratePassword.mjs +++ b/src/core/operations/GeneratePassword.mjs @@ -50,24 +50,19 @@ class GeneratePassword extends Operation { const len = args[0]; const symbols = args[1]; const numbers = args[2]; - const baseAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; const lowerAlphabet = baseAlphabet.toLowerCase(); const symbolSet = "!@#$%^&*()-=_+|'\""; const numberSet = "123456789"; - let alphabet = baseAlphabet + lowerAlphabet; alphabet += symbols ? symbolSet : ""; alphabet += numbers ? numberSet : ""; - const resultArray = new Array(len); for (let i = 0; i < len; i++) { resultArray[i] = alphabet.charAt(Math.floor(Math.random() * alphabet.length)); } - return resultArray.join(""); } - } export default GeneratePassword;