generateOtp function exported ✓ 100.0%
Last updated: 2026-03-03T18:48:07.257Z
Location
Metrics
LOC: 3
Complexity: 1
Params: 1
Coverage: 100.0% (1/1 lines, 3x executed)
Signature
generateOtp(length = 6): : string
Summary
Generates a random numeric OTP (one-time password).
Tags
#@param length - Number of digits (default: `6`)
Source Code
export function generateOtp(length = 6): string {
return faker.string.numeric(length);
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| GeneratorFn | calls |