vs-otp-generator
v1.0.1
Published
Otp genrator
Downloads
12
Maintainers
Readme
vs-otp-generator
A lightweight, zero-dependency JavaScript package to generate secure OTPs — numeric and alphanumeric — with just one line of code. Ideal for login verification, mobile/email authentication, and testing.
🚀 Features
✅ Generate numeric OTPs (only digits)
✅ Generate alphanumeric OTPs (letters + digits)
✅ Customizable OTP length
✅ Modern ES module syntax
✅ Small, fast & zero dependencies
🚀 Installation
npm install vs-otp-generatorimport { generateNumericOTP} from 'vs-otp-generator';
import { generateAlphaNumericOTP} from 'vs-otp-generator';console.log(generateNumericOTP());
console.log(generateAlphaNumericOTP(8));
By default it genrate 6 digits of otp length but you can pass perametter acourding to your otp length
