Spaces:
Runtime error
Runtime error
import * as HbsModule from 'hbs'; | |
export const hbs = HbsModule.create(); | |
hbs.registerHelper('urlenc', (str) => { | |
return encodeURIComponent(str); | |
}); | |
hbs.registerHelper('stringify', (o) => { | |
return JSON.stringify(o); | |
}); | |
hbs.registerHelper('eq', function(arg1, arg2, options) { | |
return (arg1 === arg2) ? options.fn(this) : options.inverse(this); | |
}); | |
hbs.registerHelper('not', function(arg1, arg2, options) { | |
return (arg1 !== arg2) ? options.fn(this) : options.inverse(this); | |
}); | |