https://github.com/brendan-c/random-password-generator
https://github.com/brendan-c/random-password-generator
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/brendan-c/random-password-generator
- Owner: brendan-c
- Created: 2019-11-13T23:16:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-13T23:31:56.000Z (over 5 years ago)
- Last Synced: 2025-02-14T08:47:30.272Z (3 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Description
Generate a password based on a given set of parameters and length# Usage
`generatePassword([parameters], length)`
## Parameters:
- `upper`
- `lower`
- `number`
- `symbol`### Changing the symbols
Modify the line containing ```const symbols = '`!@#$%^&*()_+-=[]{}|;\':",./<>?'```Include/exclude any symbols you desire in the string
##### Note: Parameters must be contained in an array. The order you list the parameters does not matter.
## Examples:
- Generate a password with a length of 8 containing only lowercase characters:
```
generatePassword(['lower'], 8) // => 'hdrfgzbl'
```- Generate a password with a length of 8 containing only uppercase and lowercase characters:
```
generatePassword(['upper', 'lower'], 8) // => 'BJdfwsUS'
```- Generate a password with a length of 16 containing only numbers, uppercase characters, and lowercase characters:
```
generatePassword(['number', 'upper', 'lower'], 16) // => 'tzX9869t4kqJx8Bz'
```- Generate a password with a length of 16 containing symbols, numbers, uppercase characters, and lowercase characters:
```
generatePassword(['upper', 'lower', 'number', 'symbol'], 16) // => '%u/o;f>gduO3t,G<'
```