freeotp

1.0.1 • Public • Published

OTP Generator for Reactjs and Nodejs

A simple npm package to generate random otp for reactjs and nodejs.

#Installation

npm i freeotp

yarn add freeotp

pnpm add freeotp

#usage for Nodejs

const otp = require("./node_modules/freeotp/node");

const generatedOtp = otp(6);
console.log(generatedOtp);
// otp(6) 6 -is the length of the otp

#usage for ReactJS

import otp from "../node_modules/freeotp/react";

const generatedOtp = otp(6);
console.log(generatedOtp);
// otp(6) 6 -is the length of the otp

Package Sidebar

Install

npm i freeotp

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

1.83 kB

Total Files

4

Last publish

Collaborators

  • rsoorajs