crs-password-generator
v1.0.0
Published
Generate a password in the format: two words (capitalized), 2 numbers, exclamation mark (e.g. CuseyHusey34!)
Maintainers
Readme
crs-password-generator
A small Node.js module that generates a password in a fixed, readable format: two words (capitalized) + 2 digits + exclamation mark, e.g. CuseyHusey34!.
Install
npm install crs-password-generatorOr from a local folder:
npm install /path/to/crs-password-generatorUsage
const { generatePassword } = require('crs-password-generator');
const password = generatePassword();
console.log(password); // e.g. "RiverStorm42!"Format
- Two words – each word has its first letter capitalized.
- Two numbers – digits from
00to99. - Exclamation mark –
!at the end.
Examples: AppleRiver34!, ShadowFlame07!, CuseyHusey34!.
Word list
- If an
english.txtfile (one word per line) exists next to the module, those words are used (filtered to 4–10 letter alphabetic words). - Otherwise, a built-in list of short words is used so the module works without any external files.
API
generatePassword()
Returns a new password string in the format above.
- Returns:
string
Contributing
Contributions are welcome. Anyone can contribute.
- Open an issue to discuss changes or report bugs
- Submit pull requests for fixes or new features
- Ensure tests pass with
npm testbefore submitting
License
MIT
