Guest User

Untitled

a guest
Jul 22nd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. handlebars : {
  2. cache: [],
  3. render : function (name, template, content, context, callback) {
  4. try {
  5. if (!cache[name]) {
  6. cache[name] = Handlebars.compile(template);
  7. }
  8. callback(cache[name](content, context));
  9. } catch (e) {
  10. // console.log('Could not render. Handlebars might not be installed');
  11. }
  12. }
  13. }
Add Comment
Please, Sign In to add comment