1.0.20 • Published 10 months ago

random-password-generator-by-eric v1.0.20

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

Random Password Generator

npm Downloads License Minified Size

A powerful library to generate random passwords with customizable options for Node.js and TypeScript environments.

Install

npm install random-password-generator-by-eric

Usage

Start by importing the library:

const { generatePassword } = require('random-password-generator-by-eric');

Generate a password using default options:

const password = generatePassword({ length: 12 }); 
console.log(`Generated Password: ${password}`);

Customize to include uppercase, numbers, and symbols:

const customPassword = generatePassword({     
    length: 16,     
    includeUppercase: true,     
    includeNumbers: true,     
    includeSymbols: true 
});  

console.log(`Custom Generated Password: ${customPassword}`);

Features

  • Customizable Length: Specify the exact length of the password.
  • Character Inclusion Options: Choose from uppercase, numbers, and symbols to include in the password.

API

generatePassword(options)

Generates a random password based on the provided options.

Parameters:

  • options (Object):
    • length (number): Length of the password.
    • includeUppercase (boolean): Include at least one uppercase letter.
    • includeNumbers (boolean): Include at least one number.
    • includeSymbols (boolean): Include at least one symbol.

Returns:

  • (string): The generated password.

Examples

Generate a simple password:

console.log(generatePassword({ length: 8 }));

Generate a complex password:

console.log(generatePassword({     
    length: 20,     
    includeUppercase: true,     
    includeNumbers: true,     
    includeSymbols: true 
}));

License

ISC © Eric Kunin

1.0.20

10 months ago

1.0.18

10 months ago

1.0.16

10 months ago

1.0.13

10 months ago

1.0.12

10 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.9

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago