Built-in Helpers
A list of all Squirrelly's built-in native helpers..
if/else
{{if(options.somevalue === 1)}}
Display this
{{#else}}
Display this
{{/if}}each
each loops over an array.
{{each(options.somearray)}}
Display this
The current array element is {{@this}}
The current index is {{@index}}
{{/each}}Helper References:
this: the current array elementindex: the index of the array element
foreach
foreach loops over an object
{{foreach(options.someobject)}}
This loops over each of an object's keys and values.
The value of the current child is {{@this}}
The current key is {{@key}}
{{/foreach}}Helper References:
this: the value of the current object childkey: the key of the current child
log
{{log("The value of options.arr is: " + options.arr)/}}tags
{{tags(--,--)/}}
--somevalue--js
{{js(options.newvalue = options.oldvalue + 983 * 2)/}}
{{newvalue}}Last updated