Installation
yarn add @sumitshakya/otp.io
or
npm install --save @sumitshakya/otp.io
Examples
const generateOTP = require("@sumitshakya/otp.io");
const otp = generateOTP() // random 4 digit OTP
const otp = generateOTP(6) // random 6 digit OTP
const otp = generateOTP(7) // random 7 digit OTP
// if you want to generate more than 4 digit otp, You can pass the number as argument