Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nsardo/random-password
Generates a random password of specified length containing a mixture of alpha-numeric characters, and specific special characters
https://github.com/nsardo/random-password
example-project meteor meteor-package meteorjs password-generator random-generation
Last synced: 12 days ago
JSON representation
Generates a random password of specified length containing a mixture of alpha-numeric characters, and specific special characters
- Host: GitHub
- URL: https://github.com/nsardo/random-password
- Owner: nsardo
- License: mit
- Created: 2017-04-21T07:37:23.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-28T00:27:39.000Z (almost 7 years ago)
- Last Synced: 2024-11-13T11:40:35.961Z (2 months ago)
- Topics: example-project, meteor, meteor-package, meteorjs, password-generator, random-generation
- Language: JavaScript
- Homepage: https://nsardo.github.io/random-password/
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# random-password
## for [Meteor](http://meteor.com)A Meteor Package to generate a random password of specified length containing a mixture of upper and lowercase alpha-numeric characters, and the special characters: ! # $ % & * + ? ~ @
Uses seedrandom.js by David Bau for random number generation
*DEFAULT*:
- Return alpha-numeric characters, roughly 80% chance for each letter
- Return special characters, roughly 20% chance for each lettergenerateRandomPassword( length [,special_chars_percent_chance] )
where LENGTH: is required, and the number of characters desired in the password
SPECIAL_CHARS_PERCENT_CHANCE: is optional, and if not included, defaults to 20 (for 20% chance)
NOTE for special_chars_percent_chance, desired percentage chance should be a WHOLE NUMBER, i.e. 25 for 25%## usage:
```
meteor add nsardo:random-password
```...
```
import { generateRandomPassword } from "meteor/nsardo:random-password";// this will create a random password of length 8, and
// a 20% chance of special chars for each letter
let pw = generateRandomPassword( 8 );
```
OR
```
// this will create a random password of length 8, special characters
// having a 50% chance of showing up each letter
let pw = generateRandomPassword( 8, 50 );
```