# pswd-generator

> Cryptographically-secure password generator written in Typescript with zero dependencies.

Latest version **1.0.2** (published 2022-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install pswd-generator
pnpm add pswd-generator
yarn add pswd-generator
bun add pswd-generator
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-01-13 |
| First published | 2022-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Cyrus Kao |
| Maintainers | cyruskao |
| Keywords | password, generator, crypto, Typescript |

## Links

- npm: https://www.npmjs.com/package/pswd-generator
- Repository: https://github.com/CyrusKao/pswd-generator
- Homepage: https://github.com/CyrusKao/pswd-generator#readme
- Issues: https://github.com/CyrusKao/pswd-generator/issues
- npm.io page: https://npm.io/package/pswd-generator

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2022-01-13
- 1.0.1 — 2022-01-11
- 1.0.0 — 2022-01-11

## README

# PSWD Generator

Cryptographically-secure password generator written in Typescript with zero dependencies.

> See how it's implemented at [my blog post](https://nocache.org/p/build-a-cryptographically-secure-password-generator-in-node-js-with-typescript).

## Installation

```sh
npm i pswd-generator
```

## Usage

### Use Presets

```ts
import generatePassword, { charsets } from 'pswd-generator';

const password = generatePassword(
  24,
  charsets.NUMBERS + charsets.LOWERCASE + charsets.UPPERCASE + charsets.SYMBOLS,
);

console.log(password);

// A:_X`h%&:eto5d8i?bFZmOAU
```

### Custom Charset

```ts
generatePassword(24, 'ABCDEFG');
```

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