Generators
A collection of magical functions that conjure data out of thin air.
generateNumber
Generate a random number
generateNumberBetween
Generate a random number within an inclusive range.
generateUuid4
Generate a Version 4 UUID (cryptographically random)
generateUuid7
Generate a Version 7 UUID encoding a Unix timestamp in the first 6 bytes and filling the rest with random bytes.
decodeUuid7
Decode a UUIDv7 string into a timestamp
generateShortUuid
Encodes a standard UUID (with dashes) into a URL-safe Base64 variant
decodeShortUuid
Decodes a short URL-safe Base64-encoded string back into a standard UUID
generateShortId
Generate a unique short ID based on the current timestamp
generatePassword
Generate a random, secure password with a mix of character types and pleasant special characters.
generateRandomIndex
Random number generator using cryptographic methods to avoid random().
generateLoremIpsum
Generate Lorem Ipsum text in various formats.
generateHighResolutionTime
Helper function to get high-resolution time using process.hrtime, or performance.now as a fallback.
getSecureRandomValues
Returns an array filled with cryptographic random bytes.