An OTP generator
Run npm i create-otp --save
use:
import createOtp from 'create-otp'
const OTP = createOtp({
limit: 6, // by default 4
alphaNum: true // to generate AlphaNumeric string and the default limit is 5
})
If you want only number just omit alphaNum
and mention limit to return number, by default 4
if you did not mention any parameter the function will return number of limit 4