About Utilities
Standalone utility functions
Browse the snippets below to find the utilities implementation you need for your Express.js project.
All Utilities Snippets
Encryption Utilities
AES-256-GCM encryption/decryption
- AES-256-GCM encryption
- Automatic IV generation
- Authentication tag verification
Pagination Helpers
Offset and cursor-based pagination
- Offset pagination
- Cursor-based pagination
- Page info calculation
Slug Generator
URL-safe slug generation
- Unicode normalization
- Special character removal
- Configurable separator
JWT Utilities
JSON Web Token signing and verification
- Token signing
- Token verification
- Refresh token support
OTP Utilities
TOTP and QR code generation
- TOTP generation/verification
- QR code generation
- Backup code support
CORS Configuration
Cross-origin resource sharing setup
- Origin whitelist
- Credentials support
- Preflight caching
Sentry Integration
Error monitoring with Sentry
- Error tracking
- Performance monitoring
- Release tracking
How to Use
Install any snippet using the Hanma CLI:
npx hanma add --framework express
For example, to install the first snippet:
npx hanma add crypto