npm i sos-password-generator
- Require the package:
const PasswordGenerator = require('sos-password-generator')
- Create an instance of PasswordGenerator Class
const generator = new PasswordGenerator();
- Generate your password:
console.log(generator.generatePassword()); //Result => generates random 8-character-length password
// contains numbers,lower case ,upper case, and symbols.
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: '!@#$',
})
hasUpper:true
hasLower:true
hasSymbol:true
hasNumber:true
passwordLength:8
allowedSymbols: '!@#$%^&*(){}[]=/<>,.'
The Syrian Open Source platform is the first platform on GitHub dedicated to bringing Syrian developers from different cultures and experiences together, to work on projects in different languages, tasks, and versions, and works to attract Syrian developers to contribute more under one platform to open source software, work on it, and issue it with high quality and advanced engineering features, which It stimulates the dissemination of the open-source concept in the Syrian software community, and also contributes to raising the efficiency of developers by working on distributed systems and teams.