UNPKG

wheelhouse-handlebars

Version:

A wheelhouse library to handlebars templates for rendering views

13 lines (9 loc) 260 B
'use strict'; var Handlebars = require('handlebars') function jsonHelper(context) { return JSON.stringify(context) } module.exports = function(handlebars){ handlebars || (handlebars = Handlebars) return handlebars.registerHelper('json', jsonHelper) }