randomNumeric
Generates a random numeric string.
randomNumeric
Signature
typescript
function randomNumeric(length: number): stringParameters
length- The length of the string to generate
Returns
Random string containing only digits.
Examples
typescript
import { randomNumeric } from 'strio'
randomNumeric(6)
// "123456" (random digits)Related Functions
- random - Random string (any characters)
- randomAlpha - Random letters only
- randomAlphanumeric - Random letters and digits