otp-generator
v4.0.1
Published
One time password generator
Downloads
206,136
Maintainers
Readme
#otp-generator
'otp-generator' is simple one time password generator and can be used as password generator.
Index
Install
npm install otp-generator --save
Usage
const otpGenerator = require('otp-generator')
otpGenerator.generate(6, { upperCaseAlphabets: false, specialChars: false });
generate(length, options)
Arguments
length
- length of password. Optional ifoptions
is optional. default length is 10.options
- optionaldigits
- Default:true
true value includes digits in OTPlowerCaseAlphabets
- Default:true
true value includes lowercase alphabets in OTPupperCaseAlphabets
- Default:true
true value includes uppercase alphabets in OTPspecialChars
- Default:true
true value includes special Characters in OTP
Tests
npm test