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
base64Decode Converts Base64-encoded binary data to plain text.
base64Encode Converts plain text to Base64-encoded binary data.
domain Returns the domain portion of an email address.
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.
guid Generates a globally unique identifier.
isEmailAddress Tests whether an email address is structurally valid.
isNullDefault Returns a default value when a value is null.
length Returns the length of a string or the number of elements in an array.
raiseError Throws an exception with a specified error message and optional error code.
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.