strong-password-checker
v1.0.1
Published
The Password Checker returns a count of steps to pass the validation
Downloads
6
Maintainers
Readme
strong-password-checker
The Password Checker returns a count of steps to pass the validation.
This is a solution for the challenge.
Installation
npm
npm i strong-password-checker
yarn
yarn add strong-password-checker
Also, you can download a minified js file
here.
It adds only strongPasswordChecker
to global scope.
Using
This is a pure function, just provide a password and get the result.
import strongPasswordChecker from 'strong-password-checker'
strongPasswordChecker('a') // 5
You may use optional arguments, they have default values
function strongPasswordChecker (
pass: string,
minLength = 6,
maxLength = 20,
maxRepeat = 3,
charConditions = [/[0-9]/, /[a-z]/, /[A-Z]/]
): number {}
Issues
If you find a bug or have a suggestion, please file an issue on GitHub.