Handlebars Utility Functions
Use the Handlebars utility functions to perform several different types of tasks. The utility functions evaluate conditions, format numbers, output text, and more.
This section contains information about these Handlebars functions.
| Function Name | Description |
|---|---|
| Fallback | Returns a fallback value if the first argument is null, empty, or if an exception occurs. |
| Format | Formats output based on a format string and optional type specification. |
| FormatCurrency | Formats a number as a currency value. |
| FormatNumber | Formats a number as a numeric type. |
| Length | Returns the length of a string or the number of elements in an array. |
| Repeat | Repeats a block of template code a specified number of times, providing loop context variables for each iteration. |
| Set | Performs local variable assignment within its block scope. |
| Sort | Sorts a list of objects by a specified field. |
| With | Changes the context within a block to a specified object so that you can access properties without repeating the object name. |