otp-sidddu007
v1.0.4
Published
'otp-Sidddu007' is one time password generator in angular and can be used as password generator.
Downloads
4
Readme
OtpSidddu007
'otp-Sidddu007' is one time password generator in angular and can be used as password generator.
Installation
npm i otp-sidddu007 --save
Usage
# app.component.ts
import { Component } from '@angular/core';
import { generateOTP } from 'otp-sidddu007';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'customOtp';
generateOTP() {
let def_number_otp = generateOTP();
console.log('Default Number', def_number_otp);
let number_otp = generateOTP({ type:'S', length: 3});
console.log('number', number_otp);
let string_otp = generateOTP({ type:'s', length: 6});
console.log('string', string_otp);
}
}
# app.component.html
<button (click)="generateOTP()"> Generate Otp </button>