password-policy-engine
v0.1.0
Published
Configurable password strength validation with entropy and policy checks
Downloads
9
Maintainers
Readme
password-policy-engine
Configurable password strength validation with entropy and policy checks.
Install
npm install password-policy-engineUsage
import { validate } from 'password-policy-engine';
const r = validate('MyP@ssw0rd', {
minLength: 8,
requireUppercase: true,
requireDigit: true,
requireSpecial: true,
});
if (r.valid) {
// ok
} else {
console.error(r.errors);
}License
MIT
