sos-password-generator

1.0.2 • Public • Published

JS-Password-Generator

Install:

npm i sos-password-generator

Usage

  1. Require the package:
const PasswordGenerator = require('sos-password-generator')
  1. Create an instance of PowerGenerator Class
const generator = new PasswordGenerator();
  1. Generate your password:
console.log(generator.generatePassword()); //Result => generates random 8-character-length password 
                                        // contains numbers,lower case ,upper case, and symbols.

Custom Options

Before generating password,You can pass options object to the method init

generator.init({
    hasUpper:true,
    hasLower:true,
    hasSymbol:true,
    hasNumber:false,
    passwordLength:15,
    allowedSymbols: '!@#$',
})

Default options

hasUpper:true
hasLower:true
hasSymbol:true
hasNumber:true
passwordLength:8
allowedSymbols: '!@#$%^&*(){}[]=/<>,.'

Credits

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i sos-password-generator

      Weekly Downloads

      0

      Version

      1.0.2

      License

      ISC

      Unpacked Size

      4.87 kB

      Total Files

      4

      Last publish

      Collaborators

      • abdussalam.alali