Handlebars:
Template
{{#if (isdefined value1)}}true{{else}}false{{/if}}
{{#if (isdefined value2)}}true{{else}}false{{/if}}
Preparation-Script
Handlebars.registerHelper('isdefined', function (value) {
  return value !== undefined;
});
Input
{ value1: {} }
Output
true
false
마지막 업데이트: 2024. 6. 5. 오후 11:37:24