Skip to content

v1.10.0

Choose a tag to compare

@jrmybtlr jrmybtlr released this 15 Feb 03:40
a518387

compare changes

✨ New Features

UUID Generation Enhancements

  • Added generateUuid4 and generateUuid7 for cryptographically secure UUID generation.
  • generateUuid is now an alias for generateUuid4 for improved clarity.
  • Added decodeUuid7 to extract timestamps from UUIDv7.

Short UUID Support

  • Added generateShortUuid to encode standard UUIDs into a URL-safe Base64 format while ensuring reversibility.
  • Added decodeShortUuid to restore a short UUID to its original form.

Secure Randomness

  • Added getSecureRandomValues to provide an array of cryptographically secure random bytes.

🔧 Improvements & Updates

Various internal improvements for performance and stability.
Refactored and optimized UUID generation logic.
Other minor updates and enhancements.

🩹 Fixes

  • formatters: Set Unix timestamp to milliseconds by default (04bad4d)
  • formatters: Handle undefined input in formatUnixTime function (6d08b9c)

💅 Refactors

  • generators: Remove old UUID generation and add Version 4 and Version 7 UUID functions (2b5eaa0)
  • generators: Remove unused hrtime offset logic and improve UUID formatting (f62bf2c)
  • generators: Rename encodeShortUuid to generateShortUuid for clarity (9cd2907)
  • generators: Rename encodeShortUuid to generateShortUuid for clarity and update tests (651613a)

✅ Tests

  • generators: Add tests for UUID generation and Short UUID encoding/decoding (13f7b62)
  • generators: Update UUID format validation in tests to match standard UUID structure (b4f7c31)
  • formatters: Update formatUnixTime tests to handle milliseconds and undefined input (0c4e1fa)

❤️ Contributors