Skip to content

randomAlphanumeric

Generates a random alphanumeric string.

randomAlphanumeric

Signature

typescript
function randomAlphanumeric(length: number): string

Parameters

  • length - The length of the string to generate

Returns

Random string containing letters and digits.

Examples

typescript
import { randomAlphanumeric } from 'strio'

randomAlphanumeric(10)
// "a1B2c3D4e5" (random alphanumeric)

See Also

Released under the MIT License.