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 NameDescription
FallbackReturns a fallback value if the first argument is null, empty, or if an exception occurs.
FormatFormats output based on a format string and optional type specification.
FormatCurrencyFormats a number as a currency value.
FormatNumberFormats a number as a numeric type.
LengthReturns the length of a string or the number of elements in an array.
RepeatRepeats a block of template code a specified number of times, providing loop context variables for each iteration.
SetPerforms local variable assignment within its block scope.
SortSorts a list of objects by a specified field.
WithChanges the context within a block to a specified object so that you can access properties without repeating the object name.