generate-secure-password
v1.0.2
Published
### Usage/Examples
Downloads
197
Readme
Secure Password Generator
Usage/Examples
Password can be generated with random combinations of numbers, symbols and charecters in upper and lower case. This combination as well as password length can be changed by passing appropriate arguments.None of the arguments are mandatory.
For installation:
npm i generate-secure-password
Sample code:
const generatePassword = require('generate-secure-password');
let yourPassword = generatePassword({
// None of the arguments are mandatory
length: 8,//not less than 4
numbers: true,//false if number needs to be excluded from password, else true
symbols: false,//false if symbols needs to be excluded from password, else true
lowercase: false,//false if lowercase character needs to be excluded from password, else true
uppercase: false,//false if uppercase character needs to be excluded from password, else true
exclude: ['"','%'] //symbols to exclude, Pass it as an array
});
console.log(yourPassword)