
ctrl+k
Enter a search term above to see results...
Enter a search term above to see results...
Array helpers provide utilities for working with arrays in templates.
Joins array elements with a delimiter.
{join itemsArray ', ' true}
Name | Type | Default | Description |
---|---|---|---|
array | array | [] | The array to join |
delimiter | string | ’ ‘ | The delimiter to use |
spaceAfter | boolean | false | Whether to add a space after the joined string |
string
- The joined string.
<p>Categories: {join categories ', ' false}</p>
Joins array elements with commas.
{joinComma itemsArray true false}
Name | Type | Default | Description |
---|---|---|---|
array | array | [] | The array to join |
oxford | boolean | false | Whether to use Oxford comma |
quotes | boolean | false | Whether to wrap items in quotes |
string
- The comma-joined string.
<p>This product comes in {joinComma colors true true}.</p>
Returns an array with a range of numbers.
{#each number in range 1 6} {number}{/each}
Name | Type | Default | Description |
---|---|---|---|
start | number | The start of the range | |
stop | number | The end of the range | |
step | number | 1 | The step between numbers |
array
- An array containing the range of numbers.
<select name="birthyear"> {#each range 1900 2024} <option value="{this}">{this}</option> {/each}</select>