UNPKG

wheelhouse-handlebars

Version:

A wheelhouse library to handlebars templates for rendering views

20 lines (15 loc) 353 B
'use strict'; var Handlebars = require('handlebars') function alienHelper(context) { var out = '' context.forEach(function(alien){ out += ' ' out += alien out += ' is invading!!' }) return out } module.exports = function(handlebars){ handlebars || (handlebars = Handlebars) Handlebars.registerHelper('aliens', alienHelper) }