Docs
/
generators

Generators

A collection of magical functions that conjure data out of thin air.

generateNumber

Link Copied!

Generate a random number

generateNumber(length: number)

generateNumberBetween

Link Copied!

Generate a random number between two values

generateNumberBetween(from: number, to: number)

generateUuid

Link Copied!

Generate a universally unique identifier (UUID).

generateUuid()

generateShortId

Link Copied!

Generate a unique short ID based on the current timestamp

generateShortId(length: number = 19)

generatePassword

Link Copied!

Generate a random, secure password with a mix of character types and pleasant special characters.

Don't forget to use our Password Checker in the Goodies section
generatePassword(options?: { length?: number, uppercase?: number, number?: number, special?: number })

generateRandomIndex

Link Copied!

Random number generator using cryptographic methods to avoid random().

generateRandomIndex(max: number)

generateLoremIpsum

Link Copied!

Generate Lorem Ipsum text in various formats.

generateLoremIpsum(count: number = 5, options?: { format: 'words' | 'sentences' | 'paragraphs' })