Create and parse structured API keys with embedded configuration. Supports versioning, type prefixes, and automatic validation for secure key management.
Encryption utility for securely encrypting and decrypting secrets using entity-specific passwords. Uses SHA-512 for key derivation and provides a simple API for secret management.
Type-safe RPC server for handling remote procedure calls. Provides automatic validation, error handling, execution context tracking, and Sentry integration.
Memoization decorator that caches function results based on arguments. Returns cached results for subsequent calls with the same arguments.
Route multiplexer for API endpoints. Dispatches requests to different services based on domain, path, and HTTP method with support for fallback handlers.
Generate various types of unique IDs with prefixes. Supports sorted IDs with timestamps, unsorted random IDs, key IDs with checksums, and Snowflake-style distributed IDs.
Create a proxy object for method interception and routing. Useful for building RPC-style clients where property access and method calls are captured and forwarded.
Type-safe RPC client for making remote procedure calls. Provides automatic serialization, error handling, and request memoization.
Join URL path segments and query parameters. Handles path normalization, null/undefined filtering, and automatic query string conversion.
Generate consistent, unique shadow IDs based on input data. Combines SHA256 hashing, base62 encoding, and timestamp extraction for deterministic ID generation.
Canonicalize JSON according to RFC 8785 standard for deterministic serialization. Ensures consistent JSON representation regardless of key order, essential for signing and hashing.
Shared OpenTelemetry bootstrap and execution-context trace fallback helpers.
Generate random integers within a specified range. Simple wrapper around Math.random() with inclusive bounds.
Distributed locking using Redlock for Redis. Ensures atomic operations across multiple instances with automatic lock extension and retry logic.
Redis client utilities with automatic reconnection, lazy initialization, and Redis Streams support. Simplifies Redis connection management with exponential backoff and error handling.
String case conversion utilities supporting multiple formats. Convert between camelCase, PascalCase, snake_case, kebab-case, and more.
Type-safe environment variable validation. Ensure required environment variables exist and have proper types at application startup.
Create and verify signed tokens with HMAC or asymmetric cryptography. Supports expiration checking and type validation with a clean token format.
Get geolocation information for IP addresses. Retrieves country, city, timezone, coordinates, ASN, and organization data from the geojs.io API.
Enhanced serialization using SuperJSON to handle complex types that standard JSON cannot encode. Preserves Maps, Sets, Dates, and other non-standard JSON types.
Base62 encoding and decoding utility for converting strings and byte arrays into URL-safe, compact representations. Useful for shortening IDs, creating readable tokens, or encoding binary data.
Cryptographic hash functions using Web Crypto API. Returns base62-encoded hash strings for compact, URL-safe representations.
Ensure a function is called only once, returning the cached result on subsequent calls. Useful for initialization functions or expensive operations that should run exactly once.
Comprehensive validation framework with composable validators and modifiers. Define schemas with full TypeScript support and get detailed error messages.