# js-password-gen

> Password Generator using javascript and nodejs

Latest version **2.2.0** (published 2023-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install js-password-gen
pnpm add js-password-gen
yarn add js-password-gen
bun add js-password-gen
```

## 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 | 2.2.0 |
| Published | 2023-02-06 |
| First published | 2023-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Alexis Garcia - gh:@alexisg24 |
| Maintainers | alexisg24 |
| Keywords | password, password-generator, javascript, nodejs, generator |

## Links

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

## Recent versions

- 2.2.0 (latest) — 2023-02-06
- 2.1.0 — 2023-01-30
- 2.0.0 — 2023-01-30
- 1.0.3 — 2023-01-30
- 1.0.2 — 2023-01-28
- 1.0.1 — 2023-01-28
- 1.0.0 — 2023-01-28

## README

## js-password-gen

Password generator using JS for NodeJS


## Installation

Install js-password-gen with npm

```bash
//Production dependencie
npm install js-password-gen

//Developer dependencie
npm install js-password-gen -D
```

## Usage
- NodeJS syntax

  ```javascript
  //@ts-check
  const generatePassword = require("js-password-gen");
  const password = generatePassword(length, options);
  /*
  length: Number,
  options: { chars: boolean, upperCase?: boolean, numbers?: boolean, symbols?: boolean }
  */
  ```
- Example:
  ```javascript
  //@ts-check
  const generatePassword = require("js-password-gen");
  const password = generatePassword(16, {chars: true, symbols: true, numbers: true, upperCase:true})
  console.log(`password:`, password) //password: #YP]%#x]u3K:/Z0;
  ```

## length - Number
- Type `number`
- Default value: `8`
- Max value: `64`
## { options } - Object

| **Prop**          | **Type**   | **Description**                                                                                                                                                                                                                                                 | **Required** |
| ----------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| chars           | `boolean`   | Include characters in your password.                                                                                                                                                                | ✅            |
| upperCase           | `boolean`   | Include upper case characters in your password.                                                                                                                                       |              |
| numbers     | `boolean`   | Include numbers in your password. |              |
| symbols         | `boolean` | Include symbols in your password.                                                                                                                                                   |              | 

## Authors

- [@alexisg24](https://www.github.com/alexisg24)

![](https://img.shields.io/twitter/follow/MasterCR_)  ![](https://img.shields.io/github/followers/alexisg24?style=social) ![](https://img.shields.io/github/stars/alexisg24/js-password-gen?style=social)

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