spawn-random is a very simple and reliable library for generating passwords
$ npm install spawn-password --save
This creates a random password that consists of alphabets,numbers and symbols with a random length
const spawn = require("spawn-password");
let spawned_password = spawn.spawn();
console.log(spawned_password);
This cretaes a random passowrd that consists of alphabets,numbers and symbols with a specified length
const spawn = require("spawn-password");
let spawned_password = spawn.spawnLength(15);
// snF78sl03P>ha$o
console.log(spawned_password);
This creates a random length password that consists of only alphabets
const spawn = require("spawn-password");
let spawned_password = spawn.spawnAlpha();
// mskAnsTiPsjU
console.log(spawned_password);
This creates a random password of specified length that consists of only alphabets
const spawn = require("spawn-password");
let spawned_password = spawn.spawnAlphaLength(15);
// slfjhetAnEmLsta
console.log(spawned_password);
This creates a random password that consists of alphabets and Numbers
const spawn = require("spawn-password");
let spawned_password = spawn.spawnAlphaNumeric();
// 6J8snms09I7T
console.log(spawned_password);
This creates a random password of specified length that consists of alphabets and Numbers
const spawn = require("spawn-password");
let spawned_password = spawn.spawnAlphaNumericLength(10);
// 92nH03Lp5
console.log(spawned_password);
This creates a random password that consists of alphabets and Symbols
const spawn = require("spawn-password");
let spawned_password = spawn.spawnAlphaSymbol();
// H*mn$nsU&
console.log(spawned_password);
This creates a random password of specified length that consists of Alphabets and Symbols
const spawn = require("spawn-password");
let spawned_password = spawn.spawnAlphaSymbolLength(10);
// p*o^GHb$#m
console.log(spawned_password);