Package Exports
- otp-agent
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (otp-agent) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
OTP-Agent 
OTP(One-Time-Password) generator for JavaScript
Installation
This is a Node.js module available through the
npm registry.
Installation is done using the
npm install command:
$ npm install otp-agentExample & Usage
const otpAgent = require('otp-agent');
const otpLength = 6;
var otp = otpAgent.generateOTP(otpLength);
console.log(otp);
otp = otpAgent.generateOTP(otpLength, { numbers: true });
console.log(otp);
otp = otpAgent.generateOTP(otpLength, { numbers: true, alphabets: true, upperCaseAlphabets: true, specialChars: true });
console.log(otp);Note
- Can be used to generate OTP using numbers, alphabets, upperCaseAlphabets, special characters and have option to choose either one of them.
- By default all options are true if any options are not provided.
Author
License
© Licensed under the MIT License.