About Utilities
Utility functions and helpers for Elysia applications
Browse the snippets below to find the utilities implementation you need for your Elysia project.
All Utilities Snippets
Pagination
Cursor and offset pagination with TypeBox schemas
- Offset pagination
- Cursor pagination
- TypeBox schemas
Response Helpers
Standardized API response builders with type-safe schemas
- Success/error builders
- TypeBox schemas
- Paginated responses
Environment Config
Type-safe environment configuration with validation
- Type inference
- Required validation
- Default values
Crypto Utilities
Cryptographic utilities using Bun's native APIs
- Bun password hashing
- Token generation
- HMAC signatures
Slug Generator
URL slug generation with transliteration support
- Transliteration
- Stop word removal
- Unique slugs
Date Utilities
Date formatting and timezone utilities for API responses
- ISO formatting
- Relative time
- Timezone support
How to Use
Install any snippet using the Hanma CLI:
npx hanma add --framework elysia
For example, to install the first snippet:
npx hanma add elysia-pagination --framework elysia