Simple tool for checks required conditions in password and sets scores power
npm i pass-power
const {passScore, passAccept} = require('pass-power');
This method return result of validation compliance with input conditions
val - Type string
minPassLength - Type number
Minimal password length
analysis - Type array
In current moment available more common cases:
- hasUppercase
- hasLowercase
- hasDigits
- hasSpecials
passScore('987654321Qq#', 8, ['hasUppercase', 'hasLowercase', 'hasDigits', 'hasSpecials'])
Gets result of method passScore() and return common state of validation (true/false)
resultObject - Type object
passAccept(passScore('12345', 5, ['hasDigits']))
ISC©