Using Helpers
Call helpers inside Handlebars expressions:Helper Categories
Text Transformation
uppercase, lowercase, capitalize, titleCase, slugify, camelCase, snakeCase, initials
String Manipulation
trim, truncate, substring, replace, repeat, padStart, padEnd, reverse, removeSpaces
Math Operations
add, subtract, multiply, divide, modulo, power, sqrt, round, ceil, floor, abs, random
Number Formatting
formatNumber, currency, percentage, formatBytes, ordinal
Date & Time
formatDate, formatTime, formatDateTime, now, addDays, daysBetween, monthName, dayName
Comparison
gt, lt, gte, lte, eq, neq
Logic
and, or, not, isEmpty, isNotEmpty, ternary, default
Arrays
first, last, at, join, length, contains, sum, average, max, min
Business
calculateTax, calculateDiscount, netAmount, invoiceNumber, dueDate
Quick Reference
Most Used Helpers
| Helper | Example | Result |
|---|---|---|
currency | {{currency 1234.5 "USD"}} | $1,234.50 |
formatDate | {{formatDate date "MMM D, YYYY"}} | Dec 15, 2024 |
uppercase | {{uppercase "hello"}} | HELLO |
add | {{add 10 5}} | 15 |
multiply | {{multiply 10 5}} | 50 |
formatNumber | {{formatNumber 1234567}} | 1,234,567.00 |
Combining Helpers
Nest helpers to perform multiple operations:Helpers in Conditionals
Use comparison helpers with#if:
Helpers in Loops
Use helpers inside#each:
Next Steps
Explore each helper category for detailed documentation and examples:- Text Transformation — Change text case and format
- String Manipulation — Trim, truncate, replace text
- Math Operations — Arithmetic and rounding
- Number Formatting — Currency, percentages, bytes
- Date & Time — Format and manipulate dates
- Comparison — Compare values
- Logic — Boolean operations
- Arrays — Work with lists
- Business — Invoices, tax, discounts

