Handlebars:
Template
{{#each paragraphs}}
<p>{{this}}</p>
{{else}}
<p class="empty">No content</p>
{{/each}}
Preparation-Script
// Handlebars.registerHelper('loud', function(string) {
//    return string.toUpperCase()
// });
Input
{}
Output
<p class="empty">No content</p>
最后更新: 2020/1/11 15:46:21