Skip to content

Instantly share code, notes, and snippets.

@caridy
Created February 26, 2013 17:21
Show Gist options
  • Select an option

  • Save caridy/5040278 to your computer and use it in GitHub Desktop.

Select an option

Save caridy/5040278 to your computer and use it in GitHub Desktop.
var HB = require('yui/handlebars').Handlebars;
var Y = require('yui/base');
var helpers = {
foo: function () {
return 2;
}
};
var t = HB.compile('{{foo}}/{{bar}}/{{#baz}}{{xyz}}{{/baz}}');
console.log(t({
bar: 1,
baz: {
xyz: 3
}
}, {
partials: {},
helpers: Y.merge(helpers, HB.helpers)
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment