https://github.com/d8corp/strong-password-checker
The Password Checker returns a count of steps to pass the validation
https://github.com/d8corp/strong-password-checker
Last synced: about 1 year ago
JSON representation
The Password Checker returns a count of steps to pass the validation
- Host: GitHub
- URL: https://github.com/d8corp/strong-password-checker
- Owner: d8corp
- License: mit
- Created: 2021-02-03T17:58:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-05T13:58:32.000Z (over 5 years ago)
- Last Synced: 2025-03-21T09:03:58.076Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# strong-password-checker
[](https://github.com/d8corp/strong-password-checker/blob/master/CHANGELOG.md)
[](https://bundlephobia.com/result?p=strong-password-checker)
[](https://www.npmjs.com/package/strong-password-checker)
[](https://github.com/d8corp/strong-password-checker/blob/master/LICENSE)
The Password Checker returns a count of steps to pass the validation.
This is a solution for [the challenge](https://leetcode.com/problems/strong-password-checker/).
### Installation
npm
```bash
npm i strong-password-checker
```
yarn
```bash
yarn add strong-password-checker
```
Also, you can download a minified js file
[here](https://github.com/d8corp/strong-password-checker/blob/master/lib/strong-password-checker.min.js).
*It adds only `strongPasswordChecker` to global scope.*
### Using
This is a pure function, just provide a password and get the result.
```typescript
import strongPasswordChecker from 'strong-password-checker'
strongPasswordChecker('a') // 5
```
You may use optional arguments, they have default values
```typescript
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](https://github.com/d8corp/innet/issues).
[](https://github.com/d8corp/innet/issues)
> ---
[](https://github.com/d8corp/innet/stargazers)
[](https://github.com/d8corp/innet/watchers)