@rnowotniak/genpass
v0.0.4
Published
Password generator in JavaScript
Readme
Password generator in JavaScript
Contact: Robert Nowotniak <[email protected]>
Usage
$ ./genpass.js -h
usage: genpass.js [-h] [--length LENGTH] [--symbols] [--upper] [--numbers]
Password generator in JavaScript
optional arguments:
-h, --help show this help message and exit
--length LENGTH, -l LENGTH
Password length
--symbols, -s Include symbols
--upper, -u Include upper case letters
--numbers, -n Include numbersExample
Generate password with default settings
$ ./genpass.js
uiyvejwy
$ ./genpass.js
rtedsuea
$ ./genpass.js
owbqrnqlCustomized settings
Length 12 characters, add upper case characters:
$ ./genpass.js -l 12 -u
OZTlVZhSKlZDLength 6 characters, add symbols:
$ ./genpass.js -l 6 --symbols
fqvrk@Length 20 characters, add upper case, numbers and symbols:
$ ./genpass.js -l 20 -uns
G7FIq${-5IKp:7`Ex5vIAPI documentation
generatePassword() ⇒ String
Generates a random password per settings given in the parameters.
By default 'ab...z' set is used to randomly choose from.
Kind: global function
Returns: String - The generated password
| Param | Type | Description | | --- | --- | --- | | settings.length | Number | The length of password | | settings.upper | Boolean | Whether to use upper case chars additionally | | settings.symbols | Boolean | Whether to use symbols additionally | | settings.numbers | Boolean | Whether to use numbers additionally |
