0.1.0 • Published 2 years ago

simple-otp-generator v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

:accessibility: Installation

npm install simple-otp-generator

:space_invader: Usage

  • How to use OTP Generator
import { generateOTP } from 'simple-otp-generator';

// Default length is 4
const otp1 = generateOTP();
console.log('Generated OTP (default length):', otp1);

// Specify length as an option
const otp2 = generateOTP({ length: 6 });
console.log('Generated OTP (length 6):', otp2);

// Provide length directly (backward compatible)
const otp3 = generateOTP(8);
console.log('Generated OTP (length 8):', otp3);
  • How to use Password Generator
import { generatePassword } from 'simple-otp-generator';

// Default length is 4
const password1 = generatePassword();
console.log('Generated Password (default length):', password1);

// Specify length as an option
const password2 = generatePassword({ length: 6 });
console.log('Generated Password (length 6):', password2);

// Provide length directly (backward compatible)
const password3 = generatePassword(8);
console.log('Generated Password (length 8):', password3);

🏛️Options

length (optional)
Type: number
Default: 4
Description: The length of the generated OTP or Password.
0.1.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.3

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago