UNPKG

bapig

Version:

Welcome to BAPIG, a powerful backend solution designed to streamline your development process. With over 40 built-in functionalities, BAPIG simplifies CRUD operations, facilitates authentication and encryption, handles communication tasks, and much more.

18 lines 674 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generateOTP = void 0; // Generating one-time password function generateOTP() { try { // Generate 6 digits random numbers from 100k to 900k var randomSixDigits = Math.floor(100000 + Math.random() * 900000); // Return the generated 6 digits one-time password return { success: true, message: randomSixDigits }; } catch (error) { // Return an error response in case of an exception return { success: false, message: error.message }; } } exports.generateOTP = generateOTP; //# sourceMappingURL=generateOTP.js.map