0.0.9 • Published 2 years ago

@zyxer/yapg v0.0.9

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

YAPG

Yet another password generator. Utility with zero dependencies to generate strong passwords

Installation

NPM

npm install --save @zyxer/yapg

Yarn

yarn add @zyxer/yapg

Examples

By default yapg doesn't require any options.

import Generator from '@zyxer/yapg';
const pg = new Generator();
console.log(pg.generate()); // Output "hEg5-RJvb-ZBcF"

However, it's possible to pass options object to customize password.

import Generator from '@zyxer/yapg';
const pg = new Generator({
  numbers: true,
  uppercase: true,
  lowercase: true,
  symbols: false, // Disable symbols
  length: 10,
  group: 0
});
console.log(pg.generate()); // Output "hEg5RJvbZB"

Options

NameTypeDefaultDescription
numbersbooleantrueEnable/disable numbers ([0-9])
uppercasebooleantrueEnable/disable uppercase (A-Z)
lowercasebooleantrueEnable/disable lowercase (a-z)
symbolsbooleanfalseEnable/disable symbols (!"#$%&'()*+,:;<=>?@^_{}~)
lengthinteger12Password length (does not take into account split into groups)
groupstring4Split the received password into groups using dash character (If 0 then there is no division into groups, otherwise this is the number of characters in the group)

License

MIT LICENSE

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago