random-code-generate
v1.0.5
Published
Random Code Generate
Downloads
8
Maintainers
Readme
Table of Contents
Installing
Using npm:
$ npm install random-code-generate --save
Example
Generate OTP:
In order to generate OTP we have example below that generate Numeric 6 Digit OTP
const generateCode = require('random-code-generate')
let OTP = generateRand.generateOtp()
console.log(OTP);
In order to generate OTP we have example below that generate Alfa Numeric 6 Digit OTP
const generateCode = require('random-code-generate')
let OTP = generateRand.generateOtp(6,true)
console.log(OTP);
In order to generate OTP we have example below that generate Numeric X Digit OTP
const generateCode = require('random-code-generate')
let OTP = generateRand.generateOtp(10)
console.log(OTP);
Generate Random Code:
In order to generate Random Code we have example below
const generateCode = require('random-code-generate')
let RandomCode = generateRand.generateRandom()
console.log(RandomCode);
In order to generate Random Code we have example below You can Pass length size default it take generate 20
const generateCode = require('random-code-generate')
let RandomCode = generateRand.generateRandom(30)
console.log(RandomCode);