# joi-zxcvbn

> Validate Password complexity with Joi and zxcvbn

Latest version **5.2.1** (published 2019-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install joi-zxcvbn
pnpm add joi-zxcvbn
yarn add joi-zxcvbn
bun add joi-zxcvbn
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.2.1 |
| Published | 2019-07-21 |
| First published | 2017-09-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Jochen Preusche |
| Maintainers | iilei |
| Keywords | password, passphrase, password strength, passphrase strength, strength meter, zxcvbn, validate, validation, joi, extension |

## Links

- npm: https://www.npmjs.com/package/joi-zxcvbn
- Repository: https://github.com/iilei/joi-zxcvbn
- Homepage: https://github.com/iilei/joi-zxcvbn#readme
- Issues: https://github.com/iilei/joi-zxcvbn/issues
- npm.io page: https://npm.io/package/joi-zxcvbn

## Dependencies (1)

- [zxcvbn](https://npm.io/package/zxcvbn.md) ^4.4.2

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 5.2.1 (latest) — 2019-07-21
- 5.2.0 — 2019-06-08
- 5.1.0 — 2019-06-08
- 5.0.0 — 2019-04-09
- 4.0.0 — 2017-09-11
- 3.0.3 — 2017-09-10
- 3.0.2 — 2017-09-10
- 2.0.2 — 2017-09-10
- 1.0.4 — 2017-09-10
- 1.0.3 — 2017-09-10
- 1.0.2 — 2017-09-10

## README

[![NSP Status](https://nodesecurity.io/orgs/iilei/projects/2ec8c65b-dbcb-4254-b96d-dc0f56fcee21/badge)](https://nodesecurity.io/orgs/iilei/projects/2ec8c65b-dbcb-4254-b96d-dc0f56fcee21)
[![bitHound Code](https://www.bithound.io/github/iilei/joi-zxcvbn/badges/code.svg)](https://www.bithound.io/github/iilei/joi-zxcvbn)
[![Build Status](https://travis-ci.org/iilei/joi-zxcvbn.svg?branch=master)](https://travis-ci.org/iilei/joi-zxcvbn)

# joi-zxcvbn password strength check

Validate Password complexity with Joi and zxcvbn

## Usage

```
npm install --save joi-zxcvbn
```

or 

```
yarn add joi-zxcvbn
```

```js
var joiZxcvbn = require('joi-zxcvbn')
var PlainJoi = require('joi');
var Joi = PlainJoi.extend(joiZxcvbn(PlainJoi));

var minimumScore = 3; // default - must in 0...4
var userInputs = ['janedoe', 'jane@doe.com']; // optional & best practice

Joi.string().min(4).zxcvbn(minimumScore, userInputs).validate('👍🐴🔋❤️', function (err) {
  console.log(err ? 'Invalid' : 'Valid')
})

```

Have a look at the `tests.js` to see how to parse its results. `feedback, score, calc_time` are
passed trough. `calc_time` is renamed to `calcTime` just because.

For configuration options, see [dropbox/zxcvbn](https://github.com/dropbox/zxcvbn#usage)

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