otpgen-pro
v1.0.4
Published
An npm package for generating otp.
Readme
OTP Generator
A simple and lightweight OTP (One-Time Password) generator for JavaScript and Node.js projects.
Installation
npm install otpgen-pro
Usage
Importing the package
const otp = require('otpgen-pro');
or for ES module users:
import {otp} from 'otpgen-pro';
Generating an OTP
const genotp = otp(6); // Generates a 6-digit OTP console.log(genotp);
Customization
The package allows you to specify the length of the OTP.
const genotp = otp(8); // Generates an 8-digit OTP console.log(genotp);
length (number): Specifies the number of digits in the OTP (default: 6).
Contributing
Pull requests are welcome! If you find any issues, feel free to open an issue on GitHub.
License
This project is licensed under the Apache 2.0 License.
