# @mineot/gen_password

> Password Generator

Latest version **1.4.0** (published 2022-12-06) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @mineot/gen_password
pnpm add @mineot/gen_password
yarn add @mineot/gen_password
bun add @mineot/gen_password
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2022-12-06 |
| First published | 2022-02-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Fabiano Pires |
| Maintainers | mineot |
| Keywords | password, generator, validator |

## Links

- npm: https://www.npmjs.com/package/@mineot/gen_password
- Repository: https://github.com/mineot/gen_password
- Homepage: https://github.com/mineot/gen_password#readme
- Issues: https://github.com/mineot/gen_password/issues
- npm.io page: https://npm.io/package/@mineot/gen_password

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.4.0 (latest) — 2022-12-06
- 1.3.17 — 2022-12-06
- 1.3.16 — 2022-12-05
- 1.3.12 — 2022-09-30
- 1.2.1 — 2022-02-14
- 1.2.0 — 2022-02-14
- 1.1.0 — 2022-02-11
- 1.0.0 — 2022-02-10

## README

# GenPassword

Generate Password API, is a easy way to generate passwords

## Install

```
npm i @mineot/gen_password
```

## Use

```javascript
import { GenPassword, TypeEnum, DimensionEnum, GenPasswordError } from "@mineot/gen_password";

try {
  const password = await GenPassword(TypeEnum.ONLY_NUMBERS, DimensionEnum.FOUR);
  console.log(password);
} catch (err) {
  // err is instanceof GenPasswordError
  console.error(err);
}

GenPassword(TypeEnum.ONLY_NUMBERS, DimensionEnum.FOUR)
  .then((res) => {
    console.log(res);
  })
  .catch((err) => {
    // err instanceof GenPasswordError
    console.error(err);
  });
```

## Type Enum

| Types         | Description                                                          |
| ------------- | -------------------------------------------------------------------- |
| ONLY_NUMBERS  | The password will only contain numbers                               |
| ONLY_ALPHAS   | The password will only contain characters                            |
| ALPHA_NUMERIC | The password will contain characters and numbers                     |
| COMPLEX       | The password will contain characters, numbers and this special chars |

## Dimension Enum

| Dimensions   | Description                      |
| ------------ | -------------------------------- |
| FOUR         | The max password size will be 04 |
| SIX          | The max password size will be 06 |
| EIGTH        | The max password size will be 08 |
| TEN          | The max password size will be 10 |
| TWELVE       | The max password size will be 12 |
| FOURTEEN     | The max password size will be 14 |
| SIXTEEN      | The max password size will be 16 |
| EIGHTEENTEEN | The max password size will be 18 |
| TWENTY       | The max password size will be 20 |

## Exception

| Message             | Code | Instance         |
| ------------------- | ---- | ---------------- |
| Invalid Type        | 400  | GenPasswordError |
| Invalid Dimension   | 400  | GenPasswordError |

## License

[MIT License](./LICENSE)

## Donate

Help me with this project: [Donate Here](./DONATE.md)

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