Skip to content

Karibash/password-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

password-generator

Github Twitter

A simple password generation helper function.

👏 Getting Started

The basic usage is as follows:

import password from '@karibash/password-generator';

console.log(password(9));
// -> C_Tpmf45L

By specifying a character array as the second argument, you can change the characters to be used during generation. At least one character from each array will be used.

You can change the string to be used when generating by doing the following:

import password, { alphabetLowercase, alphabetUppercase } from '@karibash/password-generator';

const charSet = [
  alphabetLowercase,
  alphabetUppercase,
];
console.log(password(9, charSet));

By default, a string containing uppercase and lowercase letters, numbers, and symbols will be generated.

const defaultCharSet = [
  alphabetLowercase,
  alphabetUppercase,
  digits,
  sign,
];

🚀 Installation

$ npm install @karibash/password-generator

🤝 Contributing

Contributions, issues and feature requests are welcome.

Feel free to check issues page if you want to contribute.

About

A simple password generation helper function.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published