password-policy
Version:
A module to check if a password lives up to a policy.
39 lines (24 loc) • 911 B
Markdown
Helps to check a string for different types of password-policies.
```
npm install password-policy
```
```js
const passwordPolicy = require('password-policy');
passwordPolicy.hasLowerCase('Test'); // => true
```
- hasUpperCase
- hasLowerCase
- hasNumber
- hasSpecialCharacter
Returns true if the number of uppercase-characters in the password is more than times.
Returns true if the number of lowercase-characters in the password is more than times.
Returns true if the number of numeric-characters in the password is more than times.
Returns true if the number of special-characters in the password is more than times.