0.1.0 • Published 2 years ago

@stefanoruth/password-strength v0.1.0

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

Password Strength

Easy to use password strength validator.

Build

Installation

yarn add @stefanoruth/password-strength

Usage

import { passwordStrength } from '@stefanoruth/password-strength'

const validation = passwordStrength('input-password', {
    min: 8,
    max: 40,
    lowercase: true,
    uppercase: true,
    numbers: true,
    symbols: true,
})

if (validation.valid) {
    // Password meets all criteria.
} else {
    // Password failed to meet all criteria.
    // See validation.errors for missing criterias.
}