strong-password-checker
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

strong-password-checker

NPM minzipped size downloads license
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.
issues


stars watchers

Package Sidebar

Install

npm i strong-password-checker

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

10.5 kB

Total Files

7

Last publish

Collaborators

  • deight