1.0.2 • Published 2 years ago

@kaffee/mazagran v1.0.2

Weekly downloads
-
License
GPLV3
Repository
github
Last release
2 years ago

@kaffee/mazagran

Enhance password strength

Support

  • The length and whether the password is in the specified character set
  • The ability of password characters to be logically adjacent, such as aBc, abC, etc.
  • The ability to be adjacent to the physical position of the password character keyboard, including the adjacent horizontal and left and right slash directions, such as qwer 1qaz 0okm, etc.
  • Ability to see if a password is present in a weak password pool
  • Adjacent single character repeated multiple times
  • The password should be a combination of English letters (case sensitive) + numbers + special characters
  • Password maximum and minimum length
  • Password special character set

Installation

Install with npm

  npm install --dev @kaffee/mazagran

Install with yarn

  yarn add --dev @kaffee/mazagran

Install with pnpm

  pnpm add -D @kaffee/mazagran

Online Demo

Online Check Demo

Usage/Examples

Base Usage

  const mazagran = new Mazagran();
  mazagran.checkAll("password") // return err dict

Config

check typedescription
PASSWORD_LENGTHcheck password length
CONTAIN_DIGITcheck password contains numbers
CASEcheck password contains case
LOWER_CASEcheck password contains lower case
UPPER_CASEcheck password contains upper case
SPECIAL_CHARcheck password contains special char
HORIZONTAL_KEY_SEQUENTIALcheck password contains horizontal keyboard key
SLANT_KEY_SEQUENTIALcheck password contains slant keyboard key
LOGIC_SEQUENTIALcheck password contains logic char
SEQUENTIAL_CHAR_SAMEcheck password contains same char

License

GPL

Contributors

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago