hbs-helpers-sync
if you use express-handlebars you can use hbs-helpers-sync to make all your server-side helpers available to your client side
Usage
I advice you to use it with Browserify as a client side NPM module
NPM
npm install --save-dev hbs-helpers-sync
Bower
bower install --save hbs-helpers-sync
Example
var runtime = ;var HHS = ;//server helpers filevar helpers = ; HHS;
Parameters
helpers [required]
helpers object with helper functions
in express-handlebars format
// ...var helpers = ; HHS;
helpers.js (server-side helpers)
{ return 'FOO!'; } { return 'BAR!'; }
Type: `Object`
Handlebars [optional]
reference to Handlebars runtime
// ...var runtime = ; HHS;
Type: `Object`
default: window.Handlebars
exclude [optional]
which helper(s) to exclude
// ... HHS;
Type: `String|Array`
include [optional]
explicit list which helper(s) to include, ignores exclude parameter
// ... HHS;
Type: `String|Array`