Skip to main content
Version: 1.1.0

isSafePassword

With this method, you can check whether the password is safe or not

Params

isSafePassword(inputPassword,options = {strictMode : false});
  • inputPassword → The password we want to check is safe
  • strictMode The strict mode checks that there must be 3 characters of each type in the password, i.e. 3 uppercase letters, 3 lowercase letters, 3 numbers, 3 symbols - By default, the strict mode value is false

Returns

true | false
  • Boolean → It returns true if the password is secure and false if it is not secure

Usage

isSafePassword("aadfdf"); //false

isSafePassword("78788989sdsdf"); //false

isSafePassword("A5h#3232"); //true

isSafePassword("SA23sa#$"); //true

isSafePassword("Al2#B3k@P-e5",{strictMode : true}); //true

isSafePassword("A5h#3232",{strictMode : true}); //false