Socket
Socket
Sign inDemoInstall

generate-password

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generate-password

Easy library for generating unique passwords.


Version published
Weekly downloads
328K
decreased by-7.58%
Maintainers
1
Weekly downloads
 
Created

What is generate-password?

The generate-password npm package is a utility for generating random passwords with various customizable options. It allows developers to create passwords with specific lengths, character sets, and patterns, making it useful for applications that require secure password generation.

What are generate-password's main functionalities?

Generate a simple password

This feature allows you to generate a simple password with a specified length and the inclusion of numbers. The code sample generates a 10-character password that includes numbers.

const generatePassword = require('generate-password');
const password = generatePassword.generate({
  length: 10,
  numbers: true
});
console.log(password);

Generate multiple passwords

This feature allows you to generate multiple passwords at once. The code sample generates an array of 5 passwords, each 10 characters long and without uppercase letters.

const generatePassword = require('generate-password');
const passwords = generatePassword.generateMultiple(5, {
  length: 10,
  uppercase: false
});
console.log(passwords);

Custom character set

This feature allows you to generate a password with a custom set of characters. The code sample generates a 12-character password that includes numbers, symbols, uppercase, and lowercase letters, while excluding similar characters.

const generatePassword = require('generate-password');
const password = generatePassword.generate({
  length: 12,
  numbers: true,
  symbols: true,
  uppercase: true,
  lowercase: true,
  excludeSimilarCharacters: true
});
console.log(password);

Other packages similar to generate-password

Keywords

FAQs

Package last updated on 24 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc