XciD's picture
XciD HF staff
initial commit
8969f81
raw history blame
No virus
487 Bytes
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);
});