otp-generator
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/otp-generator package

4.0.1 • Public • Published

#otp-generator

'otp-generator' is simple one time password generator and can be used as password generator.

Build Status npm version npm Test Coverage js-standard-style

NPM

Index

Install

npm install otp-generator --save

Usage

const otpGenerator = require('otp-generator')

otpGenerator.generate(6, { upperCaseAlphabets: false, specialChars: false });

generate(length, options)

Arguments

  • length - length of password. Optional if options is optional. default length is 10.
  • options - optional
    • digits - Default: true true value includes digits in OTP
    • lowerCaseAlphabets - Default: true true value includes lowercase alphabets in OTP
    • upperCaseAlphabets - Default: true true value includes uppercase alphabets in OTP
    • specialChars - Default: true true value includes special Characters in OTP

Tests

npm test

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
4.0.125,506latest

Version History

VersionDownloads (Last 7 Days)Published
4.0.125,506
4.0.01,413
3.0.0524
2.0.11,244
2.0.01,309
1.1.0281
1.0.10
1.0.00
0.0.11

Package Sidebar

Install

npm i otp-generator

Weekly Downloads

6,789

Version

4.0.1

License

MIT

Unpacked Size

6.34 kB

Total Files

4

Last publish

Collaborators

  • maheshkumar-kakade