UNPKG

handlebars

Version:

Handlebars provides the power necessary to let you build semantic templates effectively with no frustration

10 lines (9 loc) 253 B
export default function(instance) { instance.registerHelper('lookup', function(obj, field, options) { if (!obj) { // Note for 5.0: Change to "obj == null" in 5.0 return obj; } return options.lookupProperty(obj, field); }); }