monster.util.formatVariableToDisplay()

Syntax

monster.util.formatVariableToDisplay(string);

Parameters

KeyDescriptionTypeDefaultRequired
stringText that will be changed into a formatted text.Stringtrue

Return value

A String representing the formatted input.

Description

This method allow developers to transform text coming from the back-end (for example Service Plan items…) that hasn’t been i18ned to be displayed in a more user-friendly way than just displaying the variable name.

Examples

Transforms a variable into a more readable string

monster.util.formatVariableToDisplay('this_is_a_test');
// output: 'This Is A Test'

On this page