Introduce bulk mode and few optimisations
Release Notes for Password Generator - Version 3.0.0
π Overview
We are excited to announce the release of version 3.0.0 of the Password Generator package. This update introduces enhanced usability, new features, and improved naming conventions for better clarity and consistency.
π What's New
- String Input for Custom Characters: The
characters
option now accepts a string instead of an array, simplifying the way users can input custom characters for password generation. - Bulk Password Generation: Introducing the
numberOfPasswords
parameter, allowing users to generate multiple passwords at once. This feature is perfect for creating a set of passwords in one go. - Improved Parameter Names: Updated parameter names for enhanced clarity:
- Renamed
lowerIncluded
,capsIncluded
,numIncluded
, andspecIncluded
toincludeLower
,includeCaps
,includeNums
, andincludeSpecs
respectively, aligning the naming convention.
- Renamed
π Migration Guide
To upgrade to the new version, please consider the following changes:
- Update the
characters
parameter to pass a string instead of an array. - Utilize the
numberOfPasswords
parameter for generating multiple passwords. - Adjust your function calls to align with the new parameter names if you were using the older ones.
π Examples of Usage
Generate a Single Password
const password = PasswordGenerator({ length: 10, includeNums: true });
console.log(password); // Outputs a 10-character password with numbers
Generate Multiple Passwords
const passwords = PasswordGenerator({ numberOfPasswords: 5 });
console.log(passwords); // Outputs an array of 5 random passwords
Using Custom Characters
const password = PasswordGenerator({ length: 10, characters: 'abc123' });
console.log(password); // Outputs a password using only 'abc123'