# pass-power

> Module for score of password, check required cases and get common state of password

Latest version **1.0.1** (published 2018-03-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install pass-power
pnpm add pass-power
yarn add pass-power
bun add pass-power
```

## 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 | 1.0.1 |
| Published | 2018-03-03 |
| First published | 2018-03-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | 'stetsD' |
| Maintainers | stetsd |
| Keywords | password, score, power, input, univalid, validation, validate, form |

## Links

- npm: https://www.npmjs.com/package/pass-power
- Repository: https://github.com/StetsD/pass-power
- Homepage: https://github.com/StetsD/pass-power#readme
- Issues: https://github.com/StetsD/pass-power
- npm.io page: https://npm.io/package/pass-power

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-03-03
- 1.0.0 — 2018-03-01

## README

# pass-power

Simple tool for checks required conditions in password and sets scores power


## Install

```sh
npm i pass-power
```


## Usage

```js
const {passScore, passAccept} = require('pass-power');
```


## API


#### passScore(val, minPassLength, analysis)

This method return result of validation compliance with input conditions

**val** - Type `string`

**minPassLength** - Type `number`

Minimal password length

**analysis** - Type `array`

In current moment available more common cases:
* hasUppercase
* hasLowercase
* hasDigits
* hasSpecials

```js
passScore('987654321Qq#', 8, ['hasUppercase', 'hasLowercase', 'hasDigits', 'hasSpecials'])
```


#### passAccept(resultObject)

Gets result of method passScore() and return common state of validation (true/false)

**resultObject** - Type `object`

```js
passAccept(passScore('12345', 5, ['hasDigits']))
```


## License

ISC©

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