duct Generate Password

duct Generate Password

A utility function to generate secure random passwords of a specified length, including uppercase, lowercase, numbers, and special characters.

duct-generate-password setup

npm i duct-generate-password

Add the duct-generate-password package in the component you want to use after installation.

import generatePassword from 'duct-generate-password'

ready to use

const newPass = generatePassword()
const longPass = generatePassword(20)

generatePassword function generates and returns a password that is 8 characters long. If you want to create passwords with long characters, it will be sufficient to specify the password length with the function.