# password-policy

> A module to check if a password lives up to a policy.

Latest version **0.0.3** (published 2016-11-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install password-policy
pnpm add password-policy
yarn add password-policy
bun add password-policy
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2016-11-23 |
| First published | 2016-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | J00nz |
| Maintainers | j00nz |
| Keywords | password, security, password-policy |

## Links

- npm: https://www.npmjs.com/package/password-policy
- Repository: https://github.com/J00nz/password-policy
- Homepage: https://github.com/J00nz/password-policy#readme
- Issues: https://github.com/J00nz/password-policy/issues
- npm.io page: https://npm.io/package/password-policy

## Recent versions

- 0.0.3 (latest) — 2016-11-23
- 0.0.2 — 2016-11-22
- 0.0.1 — 2016-11-22

## README

# password-policy
Helps to check a string for different types of password-policies.

## Install

```
npm install password-policy
```

## Example

```js
const passwordPolicy = require('password-policy');

passwordPolicy.hasLowerCase('Test'); // => true
```

#### Functions:
  - hasUpperCase
  - hasLowerCase
  - hasNumber
  - hasSpecialCharacter


###### hasUpperCase(password, (times = 1))
Returns true if the number of uppercase-characters in the password is more than times.


###### hasLowerCase(password, (times = 1))
Returns true if the number of lowercase-characters in the password is more than times.


###### hasNumber(password, (times = 1))
Returns true if the number of numeric-characters in the password is more than times.


###### hasSpecialCharacter(password, (times = 1))
Returns true if the number of special-characters in the password is more than times.

---
_Source: https://npm.io/package/password-policy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
