4.0.1 • Published 3 years ago
otp-generator v4.0.1
#otp-generator
'otp-generator' is simple one time password generator and can be used as password generator.
Index
Install
npm install otp-generator --saveUsage
const otpGenerator = require('otp-generator')
otpGenerator.generate(6, { upperCaseAlphabets: false, specialChars: false });generate(length, options)
Arguments
length- length of password. Optional ifoptionsis optional. default length is 10.options- optionaldigits- Default:truetrue value includes digits in OTPlowerCaseAlphabets- Default:truetrue value includes lowercase alphabets in OTPupperCaseAlphabets- Default:truetrue value includes uppercase alphabets in OTPspecialChars- Default:truetrue value includes special Characters in OTP
Tests
npm test