Skip to main content
Version: 0.1.8

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 2 characters of each type in the password, i.e. 2 uppercase letters, 2 lowercase letters, 2 numbers, 2 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("SA23sa#$",{strictMode : true}); //true

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