# zhf.random-password

> no description

Latest version **1.0.2** (published 2018-01-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install zhf.random-password
pnpm add zhf.random-password
yarn add zhf.random-password
bun add zhf.random-password
```

## 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.2 |
| Published | 2018-01-30 |
| First published | 2018-01-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | zhouhuafei |

## Links

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

## Dependencies (2)

- [zhf.extend](https://npm.io/package/zhf.extend.md) ^2.0.1
- [zhf.random-num](https://npm.io/package/zhf.random-num.md) ^1.0.1

## Recent versions

- 1.0.2 (latest) — 2018-01-30
- 1.0.1 — 2018-01-30
- 1.0.0 — 2018-01-30

## README

# 随机密码
* 安装
```
npm i --save zhf.random-password
```
* 应用
```
const randomPassword = require('zhf.random-password');
```

# 第一参数密码长度
* 密码长度默认是6位
```
randomPassword(); // r6!QkV
randomPassword(8); // 6@2y#VsR
```

# 第二参数密码规则
* hasUpperCase 是否有大写字母(默认有)
* hasLowerCase 是否有小写字母(默认有)
* hasNumber 是否有数字(默认有)
* hasCharacter 是否有特殊字符(默认有)
```
randomPassword(8, {
    hasUpperCase: true, // 是否有大写字母
    hasLowerCase: true, // 是否有小写字母
    hasNumber: true, // 是否有数字
    hasCharacter: false, // 是否有特殊字符
}); // Skb64yGI
```

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