rendr-handlebars
Version:
Glue handlebars templates into a Rendr app.
10 lines (9 loc) • 387 B
JavaScript
/**
* Get a property that is being passed down through helpers, such as `_app`
* or `_view`. It can either live on the context, i.e. `this._app`, or in the
* `options.data` object passed to the helper, i.e. `options.data._app`, in the
* case of a block helper like `each`.
*/
module.exports = function (key, context, options) {
return context[key] || (options.data || {})[key];
}