1.0.0 • Published 2 years ago

pw-generator v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

PW Generator

Description

A straightforward password generation library capable of creating passwords based on specified length and character sets.

Installation

pnpm install pw-generator

Usage

import { GeneratePW } from 'pw-generator';

const options = {
  specials: false,
  uppercase: false,
  lowercase: true,
  numbers: true,
};

const pw = new GeneratePW(32, options);

console.log(pw.generatePassword()) // 2a1zyb253h042v6hjnrv9utkv1dkgeon

Options

OptionTypeDefaultDescription
specialsbooleanfalseIf true the password will contain special characters
uppercasebooleanfalseIf true the password will contain uppercase characters
lowercasebooleanfalseIf true the password will contain lowercase characters
numbersbooleanfalseIf true the password will contain numbers

Aclaration

The maximum number of characters allowed is 32. Beyond this limit, an effective result is not guaranteed. This library is not intended to be used in production.

License

MIT License - LICENSE for full text © Nahuel Gomez 2023.

Author