view-helpers.js
* Base Application - View Helpers
* @module greppy/app/worker/base/view-helpers
* @author Hermann Mayer <hermann.mayer92@gmail.com>
* Populate the given application with view helpers.
* @param {Object} app - Application to configure
* @param {function} callback - Function to call on finish
ViewHelpers.prototype.configure = function(app, callback)
// Push view helpers to the application
return callback && callback();
greppy.helper.list().forEach(function(helper) {
if (-1 === helper.indexOf('view')) {
path.splice(path.indexOf('view'), 1);
var buildPath = function(base, props, value) {
if (!base.hasOwnProperty(prop)) {
buildPath(base[prop], props, value);
buildPath(app.locals.helper, path, greppy.helper.get(helper));